https://bugzilla.novell.com/show_bug.cgi?id=361948
Summary: Character encoding silently fails Product: Mono: Class Libraries Version: unspecified Platform: Other OS/Version: Ubuntu Status: NEW Severity: Normal Priority: P5 - None Component: System AssignedTo: mono-bugs@lists.ximian.com ReportedBy: [EMAIL PROTECTED] QAContact: mono-bugs@lists.ximian.com Found By: Other I have an application which attempts to coerce a UTF-8 string to ASCII ( I'm glad I can say I didn't make it ). When .net on Windows fails to map it throws System.Text.EncoderFallbackException , on Mono 1.2.6 on Linux it silently fails and replaces the characters that can't be converted with a ? Here's the full exception on .net: System.Text.EncoderFallbackException: Unable to translate Unicode character \u20 19 at index 3861 to specified code page. at System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int3 2 index) at System.Xml.CharEntityEncoderFallbackBuffer.Fallback(Char charUnknown, Int3 2 index) at System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars) at System.Text.ASCIIEncoding.GetBytes(Char* chars, Int32 charCount, Byte* byt es, Int32 byteCount, EncoderNLS encoder) at System.Text.EncoderNLS.Convert(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, Boolean flush, Int32& charsUsed, Int32& bytesUsed, Boolean& com pleted) at System.Text.EncoderNLS.Convert(Char[] chars, Int32 charIndex, Int32 charCo unt, Byte[] bytes, Int32 byteIndex, Int32 byteCount, Boolean flush, Int32& chars Used, Int32& bytesUsed, Boolean& completed) at System.Xml.XmlEncodedRawTextWriter.EncodeChars(Int32 startOffset, Int32 en dOffset, Boolean writeAllToStream) at System.Xml.XmlEncodedRawTextWriter.FlushBuffer() at System.Xml.XmlEncodedRawTextWriter.WriteRawWithCharChecking(Char* pSrcBegi n, Char* pSrcEnd) at System.Xml.XmlEncodedRawTextWriter.WriteRaw(String data) at System.Xml.XmlWellFormedWriter.WriteRaw(String data) at TPConsole.Program.CreateTP(String XMLName) Personally, I find the silent failure a bit concerning! -- 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. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs