[Top][All Lists]

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

Re: [DotGNU]how to find ByteOrder Marks

From: ginga
Subject: Re: [DotGNU]how to find ByteOrder Marks
Date: Thu, 06 Mar 2003 11:18:28 +0900


> I believe that non-Unicode encodings, such as Shift-JIS, are passed to 
> XmlTextReader explicitly as part of the XmlParserContext parameter.  MS'es 
> implementation cannot auto-detect as far as I can tell.  We might be able to 
> smooth this a little for url's, by using the "charset" parameter on the MIME 
> type in the HTTP header to automatically create the correct encoding object.

No. XmlTextReader autodetects its xml declaration. Explicit parameter 
is not required. And of course, it is specific to XML stuff.

Below is the very simple case I could read Shift_JIS document on MS.NET:

  string s;
  FileStream fs = new FileStream ("sjis.xml", FileMode.Open);
  XmlTextReader xtr = new XmlTextReader (fs);
  while (xtr.Read ())
    s = xtr.Name;

  Atsushi Eno

reply via email to

[Prev in Thread] Current Thread [Next in Thread]