core.sys.windows.windows and TCHAR

Regan Heath regan at netmail.co.nz
Mon Jan 13 08:29:55 PST 2014


On Mon, 13 Jan 2014 13:37:54 -0000, Olivier Pisano
<olivier.pisano at laposte.net> wrote:

> On Friday, 10 January 2014 at 14:02:13 UTC, Regan Heath wrote:
>>
>> IIRC wchar_t is actually UCS-2 (called Multibyte by devenv and various  
>> functions) which is a sub-set of UTF-16.  So, calling a windows W  
>> function with wchar[] could also break.. just in far fewer cases than  
>> char[] with A functions.
>>
> IIRC Microsoft did change from UCS-2 to UTF-16 with Windows 2000
> (maybe XP).

Interesting.  I think XP SP3 came out about the same time, so perhaps it  
has support - or it can be installed separately.  Google tells me windows  
server 2000 is perhaps correct, except there may still be some "issues":

http://stackoverflow.com/questions/7870014/how-does-windows-wchar-t-handle-unicode-characters-outside-the-basic-multilingua

In short, you can put UTF-16 in wchar_t, but not all /applications/ will  
deal with it perfectly.  I expect the API to deal with it however, and  
that's all we really care about.

In any case, I think we all agree that the W functions should be the  
default.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list