[Mono-bugs] [Bug 678177] New: mono's Encoding.Convert doesn't behave as the .NET version

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 9 11:33:34 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=678177

https://bugzilla.novell.com/show_bug.cgi?id=678177#c0


           Summary: mono's Encoding.Convert doesn't behave as the .NET
                    version
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: x86-64
        OS/Version: Debian Woody
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: th at refusion.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729;
Media Center PC 6.0; .NET4.0C)

when changing text encodings of strings, the .net framework (windows server
2003) transliterates special characters. as an example: when converting from
utf-8 to iso-8859-1 the character "’" (\u2019) is transliterated to "'". 

in mono (debian squeeze), the same conversion will replace the special
character with an "?". 

iconv would support a transliteration that matches the .net framework's
implementation by specifying the target encoding "ISO-8859-1//TRANSLIT".
unfortunately that can't used as a workaround directly, as mono won't accept
such a name for System.Text.Encoding.GetEncoding()


Reproducible: Always

Steps to Reproduce:
an example code for converting between two encodings can be found here:
http://msdn.microsoft.com/en-us/library/system.text.encoding.convert(v=vs71).aspx
Actual Results:  
special characters unknown to the target encoding are replaced by a "?" instead
of a transliterate representation

Expected Results:  
special characters unknown to the target encoding should be replaced by their
transliterated representation just like .net/windows does.

-- 
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