Re: [xml] setting the default charset ?



On Sat, Jul 28, 2001 at 07:53:10PM +0200, Cyrille Chepelov wrote:
Le sam, jui 28, 2001, à 01:13:39 -0400, Daniel Veillard a écrit:
On Sat, Jul 28, 2001 at 06:50:54PM +0200, Cyrille Chepelov wrote:

  Right, enclosed patch should fix the problem,

Mmmmh, yes, it looks like it fixes my problem. However, it's possible it
brings a deviation from standard or reasonible behaviour:
      1) I call xmlSwitchEncoding(KOI8-R);
      2) I start parsing a file
      3) That file happens to be encoded in UTF-16.

    Then you made an error. Might be due to a confusion between locale
and encoding. If you say xmlSwitchEncoding(KOI8-R) the you have to be sure 
it is actually encoded in this encoding. You cannot just drop whatever locale
is there and expect this to work. In XML there is no guess work. If you guess
and you are wrong then you die, it is normal and has to stay this way.

    Sorry I'm gonna stick to the standard here. You MUST know the encoding
if you decide to try to override the default behaviour.

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]