Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: How to get standard paths?!? Date: Sat, 17 Aug 2019 16:33:58 -0700 Organization: None to speak of Lines: 35 Message-ID: References: <_ZR5F.12655$hJ3.11614@fx07.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="9783fc84761b29b85f300e9e166573f7"; logging-data="1691"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e3K4CD8ZmG6Rrfwln2eG0" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:hlg9ZkQAbDBJuMWD7y5kzAsc4nY= sha1:r9W29+1Q9tJoprI2HFKgb3oa98E= Xref: csiph.com comp.lang.c++:67719 David Brown writes: > On 17/08/2019 18:26, Bonita Montero wrote: >>> Exactly, yes. 16-bit wchar_t can't do that on a system that >>> supports Unicode (regardless of the encoding). >> >> There will be no more Unicode codepoints populated than could be >> adressed by UTF-16. At least until we gonna support alien languages. > > Does your ignorance know no bounds? > > Aren't you even capable of the simplest of web searches or references > before talking rubbish in public? I think you have incorrectly assumed that Bonita is asserting that there are no more than 65536 Unicode codepoints. UTF-16 can represent all Unicode codepoints. It cannot represent each Unicode codepoint in 16 bits; some of them require two 16-bit values. I presume Bonita meant that UTF-16 can represent all of Unicode (which is true). But a 16-bit wchar_t cannot, because the standard requires wchar_t to be "able to represent all members of the execution wide-character set" (that's the point Bonita missed or ignored). To use wchar_t to represent all Unicode code points, you either have to make wchar_t at least 21 bits (more likely 32 bits) *or* you have to use it in a way that doesn't satisfy the requirements of the standard, such as using UTF-16 to encode some characters in more than one wchar_t. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */