[Mono-dev] XmlTextReader problems in mono 2.10.2
atsushieno at veritas-vos-liberabit.com
Mon Jul 25 10:48:34 EDT 2011
I just confirmed that it does not reproduce (I am pretty sure it must
not, as such problematic error would have flooded this list). If you
still think there is bug, come up with the problematic test xml stream
and corresponding code that creates the actual "IFXstream".
> I'm having problems reading UTF-8 encoded XML files, only in mono on
> Linux and MacOSX (2.10.2 and 2.10.1 respectively). 2.10.2 on Windows 7
> 64 bit runs just fine, as does .NET
> The issue is that the XmlTextReader can't open an XML file with UTF-8
> encoding, it comes up with an old error, '?>' is Expected as
> This seems true of any Xml file, as long as it is UTF-8 encoded, which
> I need for multiple language support, as I need translations inside
> the single XMl file.
> I am using the following code to initialise the XmlTextReader:
> XmlReaderSettings settings = new XmlReaderSettings();
> settings.ConformanceLevel = ConformanceLevel.Auto;
> settings.IgnoreWhitespace = true;
> settings.IgnoreComments = true;
> settings.ValidationType = ValidationType.None;
> XmlReader reader = XmlReader.Create(IFXstream, settings);
> XmlDocument IFXmodel = new XmlDocument();
> Setting the ConformanceLevel.Auto fixed it running in Mono on Windows,
> but still left it broken on Linux and MacOSX.
> I tried converting the files to UTF-32, but then I just get a
> Converting to Western ISO won't work as gedit reports there are
> characters in the file that will be lost in the conversion.
> Any thoughts?
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list