November 24, 2008
novice2 Wrote:

> i am afraid that windows API named *W works with UCS2 string. but D wchar[] is UTF-16.

Wrong - Windows has used UTF-16 as native since Windows 2000.
November 24, 2008
John C wrote:
> novice2 Wrote:
> 
>> i am afraid that windows API named *W works with UCS2 string.
>> but D wchar[] is UTF-16.
> 
> Wrong - Windows has used UTF-16 as native since Windows 2000.

Actually, you're both right. UCS2 is UTF-16.
November 24, 2008
On Mon, 24 Nov 2008 16:53:20 +0300, Christopher Wright <dhasenan@gmail.com> wrote:

> John C wrote:
>> novice2 Wrote:
>>
>>> i am afraid that windows API named *W works with UCS2 string.
>>> but D wchar[] is UTF-16.
>>  Wrong - Windows has used UTF-16 as native since Windows 2000.
>
> Actually, you're both right. UCS2 is UTF-16.

No. A quote from Wikipedia:

"Because of the technical similarities and upwards compatibility from UCS-2 to UTF-16, the two encodings are often erroneously conflated and used as if interchangeable, so that strings encoded in UTF-16 are sometimes misidentified as being encoded in UCS-2."

"UTF-16 is the native internal representation of text in the Microsoft Windows 2000/XP/2003/Vista/CE; Qualcomm BREW operating systems; the Java and .NET bytecode environments; Mac OS X's Cocoa and Core Foundation frameworks; and the Qt cross-platform graphical widget toolkit."

"Older Windows NT systems (prior to Windows 2000) only support UCS-2."
May 02, 2013
Better late than never...

On Sunday, 23 November 2008 at 02:28:30 UTC, Christopher Wright
wrote:
...
> I thought (perhaps wrongly) C allowed you to declare main as taking a list of environment variables, which is why I asked

Indeed, on Unix { not POSIX } and Windows:

From Wiki:
======================
Other platform-dependent formats are also allowed by the C and
C++ standards, except that in C++ the return type must always be
int;[3] for example, Unix (though not POSIX.1) and Microsoft
Windows have a third argument giving the program's environment,
otherwise accessible through getenv in stdlib.h:

int main(int argc, char **argv, char **envp);

Mac OS X and Darwin have a fourth parameter containing arbitrary
OS-supplied information, such as the path to the executing
binary:[4]
======================

Mark
~~~~
1 2
Next ›   Last »