First Impressions
Walter Bright
newshound at digitalmars.com
Sat Sep 30 11:35:44 PDT 2006
Sean Kelly wrote:
> Walter Bright wrote:
>>
>> Contrast that with C++, which has no usable or portable support for
>> UTF-8, UTF-16, or any Unicode. All your carefully coded use of
>> std::string needs to be totally scrapped and redone with your own
>> custom classes, should you decide your app needs to support unicode.
>
> As long as you're aware that you are working in UTF-8 I think
> std::string could still be used. It just may be strange to use
> substring searches to find multibyte characters with no built-in support
> for dchar-type searching.
It's so broken that there are proposals to reengineer core C++ to add
support for UTF types.
1) implementation-defined whether a char is signed or unsigned, so
you've got to cast the result of any string[i]
2) none of the iteration, insertion, appending, etc., operations can
handle multibyte
3) no UTF conversion or transliteration
4) C++ source text encoding is implementation-defined, so no using UTF
characters in source code (have to use \u or \U notation)
More information about the Digitalmars-d
mailing list