[Mono-bugs] [Bug 674580] New: An exception is thrown when trying to read UTF-16-encoded XML files
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Feb 23 22:35:06 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=674580
https://bugzilla.novell.com/show_bug.cgi?id=674580#c0
Summary: An exception is thrown when trying to read
UTF-16-encoded XML files
Classification: Mono
Product: Mono: Runtime
Version: 2.10.x
Platform: x86-64
OS/Version: openSUSE 11.3
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: fanart at thelostworlds.net
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13)
Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)
I recently released an open source multispectral image-processing utility
(http://www.beneaththewaves.net/Software/The_Mirrors_Surface_Breaks.html).
Because of the way its XML configuration files are handling before being passed
to the .NET XML parser, I require that the files be UTF-16-encoded.
This works fine in .NET, but in Mono, attempting to read any of these files
causes Mono to immediately throw this exception: "a name did not start with a
legal character -1 (�) Line 1, position 2."
I apologize if this is a known issue. I have found several existing bugs
regarding situations in which *some* content in an XML file is UTF-16-encoded,
but not any regarding situations where *the entire file* is UTF-16-encoded.
Reproducible: Always
Steps to Reproduce:
1.Attempt to load an XML file which is entirely encoded as UTF-16.
2.Exception is thrown.
Actual Results:
The exception is thrown.
Expected Results:
The file is read by the XML parser.
Numerous sample files are located in the TMSB_Config subdirectory of this zip
file:
http://www.beneaththewaves.net/Downloads/TMSB-1.1.zip
If you want to test the behaviour in this specific application, it's easiest to
see in the CLI version (TMSB.exe). In the GUI, a blank "I/O Error" dialogue is
shown instead. You can call the CLI version in this manner to reproduce the
problem:
mono ./TMSB.exe -i "Input-NIR_R_G_B_UVA-TIFF-3F.xml" -p "Process-NFB.xml" -o
"Output-TIFF_16-JPG_8.xml" .
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list