|
| From: | Roumen Petrov |
| Subject: | Re: [bug-gettext] [bug #52932] XML doesn’t default to UTF-8 |
| Date: | Sat, 20 Jan 2018 17:37:39 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 SeaMonkey/2.30 |
Bruno Haible wrote:
Update of bug #52932 (project gettext):
Status: None => Need Info
_______________________________________________________
Follow-up Comment #1:
Why? Why make an assumption about the encoding (that assumption can be wrong)
- thus possibly produce an file in another encoding than the one the caller
expects? When we have a way to get away without this assumption and produce a
valid and unambiguous XML always.
There is no exactly default encoding for xml as specification requires xml processor to support UTF-8 and UTF-16 encoding - for more details see chapter https://www.w3.org/TR/xml/#charencoding .
Next encoding is required if is not UTF-8 or UTF-16. Actually is more complicated. Let me quote from specification (same chapter) : "In the absence of external character encoding information (such as MIME headers), parsed entities which are stored in an encoding other than UTF-8 or UTF-16 /MUST/ begin with a text declaration...."
So if there is no explicit specification of according to standard encoding is either UTF-8 or UTF-16.
Roumen
| [Prev in Thread] | Current Thread | [Next in Thread] |