Re: [xml] setting the default charset ?



On Sun, Jul 29, 2001 at 11:20:22AM +0200, Cyrille Chepelov wrote:
get reports from Solaris and Windows users). Many people are running
outdated versions, so while I plead shared guilt for not having switched
from libxml1 earlied, we'll have to deal with libxml1-generated files for a
while. And yes, this means libxml1-generated "garbage".

  This was well known, impossible to fix in libxml1 and fixed for nearly
1.5 years in libxml2. The NO EXCUSE rule applies ... I know it applies to the 
whole Gnome project. I may have a part of responsability in this but 
I have told people to switch for this period.

      2) xmlSwitchEncoding() has been called before the parser ; in that
      case libxml2 won't try to detect the encoding, and will follow
      whatever it has been told to. However, this won't prevent
      xmlParseEncodingDecl() from being ran and from overriding what the user
      asked (this is not very consistent).

   This is very consistent at the XML level. However if there is an encoding
declaration at the protocol level then it is authorithative (I just discovered
this in http://www.ietf.org/rfc/rfc2376.txt :-( ), I consider this a serious
mistake. Anyway I will try to fix libxml2 to ignore encoding declarations
if there have been a encoding specified at a lower level.

[*] What's an HTML agent is supposed to do when it's been told a stream is

  Comparing HTML and XML on this is purely useless. The way to handle
encoding is defined very differently

  To come back to Dia, guessing is the last thing to try. Ask the user if
you have a trouble, BUT DO NOT GUESS ! If you guess and load a russian encoded
file in a french environment based on the local and that the file is saved
then you get a successful but wrong conversion and if the user saves the
document all non-ascii will be wrong permanently.

  If you guess you die ! That's the way HTML works, I don't want to get
a similar mess on XML ... Or at least I don't want to try to provide support
for the XML parser in those conditions.

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]