phobos/tango on win32: please drop ANSI "support"
Lionello Lunesu
lionello at lunesu.remove.com
Wed Feb 14 09:36:43 PST 2007
"BCS" <BCS at pathlink.com> wrote in message
news:eqvgkt$ubi$1 at digitalmars.com...
> Lionello Lunesu wrote:
>> Both Phobos and Tango pretend utf8 is valid for calling ANSI methods from
>> the Windows' API. Obviously, it's not. The correct way is to convert the
>> utf8 string to the code-page expected by the call, or convert them to
>> unicode.
>>
>> I'd like to suggest the latter. Let's drop the ANSI support for Win32
>> altogether. Unicode is supported since Windows 95 OSR-2 (if I'm not
>> mistaken) and converting utf8 to ANSI is more expensive than converting
>> it utf8 to utf16 (which is what Windows 2000 and up convert to internally
>> anyway). No more "bool UseWFuncs". And converting utf8 to utf16 using
>> MultiByteToWideChar would also take care of the 0-terminator.
>>
>> There, I've said it.
>>
>> L.
>
> Do you mean ASCII?
No, definitely not ASCII.. What does the A stand for in RegisterClassA,
CreateWindowA, CreateFileA, etc. in the Windows API? W = Wide, 'wchar',
but what's A?
>From MSDN:
...with the specific "A" (ANSI) or "W" (wide, Unicode)...
L.
More information about the Digitalmars-d
mailing list