Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: How to get standard paths?!?
Date: Thu, 22 Aug 2019 12:37:58 -0700
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <867e752dpl.fsf@mailhub.linuxsc.com>
References: <_ZR5F.12655$hJ3.11614@fx07.am4> <7cb6F.89442$GfB1.45648@fx36.am4>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader02.eternal-september.org; posting-host="59398aca864cd103291b848dd2e1e135"; logging-data="9646"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PKXnlPuchSzwciIUduMKKv0Ridl5IDDI="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:xZWvqdhO8F5cg6oFIxy+SN+Owng= sha1:z9kVqiuzEtj9jzuvbgVOCyQsFnQ=
Xref: csiph.com comp.lang.c++:67886
"Alf P. Steinbach" writes:
> On 19.08.2019 08:52, David Brown wrote:
>
>> On 18/08/2019 21:51, Bart wrote:
>>
>>> On 18/08/2019 19:33, Bo Persson wrote:
>>>
>>>> On 2019-08-18 at 14:07, Bart wrote:
>>>>
>>>>> On 18/08/2019 11:57, Bonita Montero wrote:
>>>>>
>>>>>>>> Unicode is defined to have a maximum of 21 bit codepoints.
>>>>>>>
>>>>>>> Yes. And how to you fit those 21 bits into a 16-bit wchar_t ?
>>>>>>
>>>>>> That's not necessary if you use UTF-16.
>>>>>
>>>>> Show me how to make use of UTF-16 here, because it doesn't seem
>>>>> to work on Windows:
>>>>>
>>>>> #include
>>>>>
>>>>> wchar_t c;
>>>>> c = 1000000; // character code 1000000
>>>>>
>>>>> printf("c = %d 0x%X", c, c);
>>>>>
>>>>> Displays:
>>>>>
>>>>> c = 16960 0x4240
>>>>>
>>>>> Not this:
>>>>>
>>>>> c = 1000000 0xF4240
>>>>
>>>> So we can only guess that this character code is not part of the
>>>> "supported locale" used in your program.
>>>>
>>>> Nowhere does the language standard require C++ to support all
>>>> available OS locales. It could be a very small subset.
>>
>> It is not the language that supports locales, or the compiler - it
>> is the /implementation/, which includes libraries and any other
>> bits and pieces needed for creating runnable programs.
>
> The above discussion is IMHO not meaningful.
>
> The issue about what the standard means when it requires support for
> all characters in the execution character set, has been discussed at
> length before, multiple times, both here and e.g. on SO.
>
> There is no good complete resolution, but there is the /observation/
> that since the standard is out of tune with reality in this respect,
> it can't very well be viewed as authoritative. [...]
It's Microsoft that is out of tune. And getting moreso as time
goes on.