[Issue 7393] Which character code does wchar be, UTF-16BE or UTF-16LE?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 28 11:20:15 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7393



--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> 2012-01-28 11:20:13 PST ---
(In reply to comment #3)
> C does not specify the size of wchar_t. On Windows, wchar_t is 2 bytes, but on
> Linux it is 4.

Yes, I know, and he knows it.

The original question is "Does the representation of wchar and dchar type value
depend on system-endianness?".

The http://d-programming-language.org/abi.html page says
"The endianness (byte order) of the layout of the data will conform to the
endianness of the target machine.", but following "Basic Types" table does not
mention about char, wchar, and dchar types.

So I had said to him in Twitter, "D's wchar type is same as C's wchar_t in
32bit system, and wchar_t depends on system endianness. So D's wchar is also
system-endianness", but he had not been able to believe that.

At least, I think the lack of descriptions about character types in abi page
should be fixed, as Comment#2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list