lua-users home
lua-l archive

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


Florian Weimer <fw@deneb.enyo.de> writes:
>> Totally agree, which is why the unicode string constant notation in
>> C++0x is a bit of a shame:  the most "obvious" notation, u"xxx", yields
>> a _UTF-16_ wide-character string constant; one must write u8"yyy" to get
>> a proper UTF-8 constant string. 
>
> Is it really UTF-16?  I would expect it to result in an a wide string
> constant whose characters are of type const wchar_t.

I don't have the standard to check, but my impression was that it yields
an object of type "char16_t*" or some such (and there's also U"..." to
get strings of type "char32_t*").  Yielding UTF-16 would be consistent
with what u8"..." does.

[and of course as the real _intent_ of this feature is probably to match
whatever Microsoft does, and wide-strings on their systems apparently
use UTF-16 these days, that suggests this feature would as well.... a
bit shoddy, but there you have it.]

-Miles

-- 
Egotist, n. A person of low taste, more interested in himself than in me.