XML character encoding (was "Re: no worries")
Syd Bauman <[email protected]>
| Newsgroups | gmane.text.tei.general |
|---|---|
| Message-ID | <[email protected]> |
The sentiment, if a bit overstated, is correct IMHO. Another disadvantage is an XML file encoded in UTF-16 must begin with a byte order mark (U+FEFF). Does the operating system handle that? Does the XML editor? Do I? The full name for UCS-4 in an XML declaration is "ISO-10646-UCS-4", and this is one of the few places where XML is case insensitive. (So a processor should recognize "ISO-10646-ucs-4" just as well.) All that said, I don't know how to get my operating system to read & write UCS-4 (or even UTF-16, not that I care), so I always use UTF-8. :-| > Allow me a technical consideration and advice. UTF-16 is only a > useless historical artefact. It should not be used in any new > project. The only sane choices are UTF-8 and (if really needed) > UCS-4. > > UTF-16 is the worst of all encodings: it wastes bits like UCS-2/4, > is incompatible with ASCII and is as computationally hard to work > with as UTF-8. > > One should use either UTF-8 for ASCII compatibility and space > savings or UCS-4 for speed of computation (but only under certain > particular circumstances).