From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Exclusive file access Date: Mon, 31 Aug 2015 09:22:37 +0200 Organization: cbb software GmbH Message-ID: References: <75714e3f-c047-413d-9aa5-3ff423167863@googlegroups.com> <1440837116.20971.33.camel@obry.net> <87oahpovpn.fsf@mid.deneb.enyo.de> <87y4gsmut1.fsf@mid.deneb.enyo.de> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: jSS3it0g+GyWYSMU5pi+5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:27644 Date: 2015-08-31T09:22:37+02:00 List-Id: On Sun, 30 Aug 2015 21:37:46 +0200, Florian Weimer wrote: > * Dmitry A. Kazakov: > >> On Sun, 30 Aug 2015 13:35:16 +0200, Florian Weimer wrote: >> >>> * Dmitry A. Kazakov: >>> >>>> No, I meant Wide_Wide_String. >>>> >>>> Ada's Wide_String is legally UCS-2. Windows is UTF-16. The only full >>>> Unicode string type is Wide_Wide_String. For an Indo-European language >>>> there is no difference, of course. >>> >>> GNAT's Wide_String should be compatible with UTF-16. >> >> In the sense that Wide_String is an array of 0..2**16-1 units of the >> endianness compatible to UTF-16, yes. However the standard is silent about >> endianness and alignment (a DSP processor might deploy 32-bit units per >> unit) >> >> Semantically no. Wide_String according to RM 3.5.2 (3/3) represents a >> narrower set of Unicode than UTF-16. > > I don't have a current Windows system to try this, but I think Windows > allows you to use lone surrogates in file names. Such names are not > valid UTF-16, but valid UCS-2. The system may have integrated AI that accepts names in English: "a file with the name of Swahili dhadi". Would it make ASCII same as Unicode? >>> Wide_Wide_String definitely is not. >> >> Definitely is. Both are to represent arrays of same sets of Unicode >> characters. The representation of Wide_Wide_String is of course irrelevant >> when used to specify an external file name, right? > > You can end up with non-expressible names, depending on how the > conversion to the external representation is performed. (I.e., the > system may have file names which cannot be encoded as > Wide_Wide_String.) Wasn't the purpose of Unicode to represent all possible characters? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de