Re: [xml] [libxml1] handling of (xmlDocPtr)doc->encoding upon save ?
- From: Cyrille Chepelov <chepelov calixo net>
- To: Cyrille Chepelov <chepelov calixo net>
- Cc: xml gnome org
- Subject: Re: [xml] [libxml1] handling of (xmlDocPtr)doc->encoding upon save ?
- Date: Mon, 30 Jul 2001 18:48:14 +0200
Le lun, jui 30, 2001, à 06:15:26 +0200, Cyrille Chepelov a écrit:
I've been able to make libxml1 produce documents with an explicit
encoding="utf-8" (note the lower case) declaration, which is almost fine
according to section 4.3.3 of XML 1.0, but well, I would be much quieter if
Oh no ! I've been hit again :-(
Now, encoding="utf-8" according to the standard is the same as
encoding="UTF-8" and is the same as an asciish file without an encoding
declaration. But, if I set encoding="utf-8", now xmlEncodeEntitiesReentrant
will think it's *not* UTF-8, and will encode the entities, making the result
(when I read it back) look like UTF-8 text shown on a latin1 console.
<begging>could libxml1 1.8.++MICRO be changed so that if doc->encoding is
present, even if xmlStrEqual(doc->encoding,"UTF-8"), that encoding spec is
written out ? Or, keep the xmlStrEqual test in xmlDocContentDump() as an
xmlStrEqual, and make the test on doc->encoding in
xmlEncodeEntitiesReentrant() a xmlStricmp() (actually, the latter is
probably better)</begging>
TIA.
-- Cyrille
--
Grumpf.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]