dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pnet-developers] String marshalling


From: Marcus
Subject: Re: [Pnet-developers] String marshalling
Date: Fri, 9 Sep 2005 04:56:26 -0500
User-agent: KMail/1.8.91

On Friday 09 September 2005 4:29 am, Marc Haisenko wrote:
> Hi folks,
> well it seems that bug #14368 (X lib doesn't display Unicode characters
> like ∞ (u221e)) is not fixed at all. I'm currently mailing back and forth
> with Peter Flaig.
>
> While investigating the string marshalling I noticed a few things:
>
> What's an ANSI charset ? That should be ASCII, shouldn't it ? I'd like to
> change that.

There are several versions of ASCII, one of is known as  ANSI X3.4-1986 
definition, also standardized as ECMA-6, ISO/IEC 646:1991 International 
Reference Version, ITU-T Recommendation T.50 (09/92). So "ANSI" is reasonable 
for "ASCII."


> Is there any reason at all to not use UTF-8 for all .NET -> C string
> marshalling ? Why the ANSI (ASCII ?) option ?

I don't have time before bed tonight, but I would be curious how .NET handles 
it if a System.String containing items that can't be mapped to ASCII/ANSI 
values is passed to a P/Invoked method.

I would say that the argument against making UTF8 the destination is that 
converting from the "native" UTF16 of System.String to UTF8 might be more 
expensive than converting from UTF16 to ASCII.

I cannot think of better technique reasons right now.

marcus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]