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


           Summary: char* should be in ANSI encoding when passed to C
                    runtime rather than Unicode
           Product: Mono: Runtime
           Version: unspecified
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: misc
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Linux implements Unicode support using UTF-8 that uses char*. C runtime
function are thus safe to be called with internal char* representations.

Windows on the other hand implements Unicode support using UTF-16 using
wchar_t* and provides support for ANSI code pages using char*.

The ANSI code page is a system-wide non-Unicode code page.

This is major issue on Windows because this can result in unexpected esoteric
bugs that are hart to track using non-English characters in file names for
example.

As a result we should avoid using C runtime library calls that result in
operating system calls. (String manipulation without is fine though.)

GLib on the other hand properly implements UTF-8 to UTF-16 conversion and avoid
this problem.

This is also a security issue because file names can be improperly represented.

The solution is to either use GLib functions for these C runtime calls or use
the Unicode versions on Windows.


-- 
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  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to