Hi Shawn, The docs for the CharSet enum specify that Unicode means "Marshal strings as Unicode 2-byte characters."
If you need to marshal strings as UCS4 (or UTF-32), you'll have to marshall things manually. You could submit a feature request to add some helper methods or something to MonoTouch to make this easier in the future. Jeff On Mon, Aug 22, 2011 at 4:12 PM, shawn <[email protected]> wrote: > I'm having problems marshalling strings when calling functions in an > existing > C library that uses wide character strings. If I marshal a string using > CharSet.Unicode, I get a UTF-16 string passed into the C code. This seems > like a bug to me since the Mac uses UTF-32 for its wide character > (Unicode?) > strings. So what is the proper way to marshal C# stings into wide character > strings that can be used in C, C++, and Obj-C? > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Marshalling-strings-to-wide-character-strings-tp3761154p3761154.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
