Re: [xml] setting the default charset ?



On Sat, Jul 28, 2001 at 11:23:23AM +0800, William M. Brack wrote:
xmlDetectCharEncoding looks at those four characters, notices that they are
"<!xm", and
then sets the encoding for the context to be UTF8 (somehow this seems
related to the
classic expression of the american Henry Ford, who once declared "You can
have any
colour you like, as long as it's black") (no offense intended).

  It's the normal process as described in the XML specification
there is an appendix about charset detection, though not normative
it's a good idea to follow it. If the application didn't tell 
what encoding is the entity, it's assumed to be UTF8 or UTF16
unless overriden by the encoding decalration in the XML decl.
Not a bug, a feature !

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]