[Mono-bugs] [Bug 422564] Strings Returned Via P/ Invoke Returned Blank When Contain Certain ANSI Characters
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Sep 8 12:30:28 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=422564
User robertj at gmx.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=422564#c3
Robert Jordan <robertj at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |robertj at gmx.net
--- Comment #3 from Robert Jordan <robertj at gmx.net> 2008-09-08 10:30:28 MDT ---
Unlike MS.NET, Mono's p/invoke layer always uses UTF8 encoding for CharSet.Ansi
and UnmanagedType.LPStr.
If your "Function (int, int, char *, int length)" is returning non UTF8
strings, you have to marshal them manually or resort to
Mono.Unix.UnixMarshal.PtrToString*:
http://www.go-mono.com/docs/index.aspx?tlink=0@ecma%3a109%23UnixMarshal%2f
See also the docs of Mono.Unix.UnixEncoding to understand the dilemma of file
names under Unix. Just in case "Function" is returning file names...
--
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