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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.99.180.10 with SMTP id s10mr7563304pgf.49.1503090418710; Fri, 18 Aug 2017 14:06:58 -0700 (PDT) X-Received: by 10.36.53.79 with SMTP id k76mr133980ita.1.1503090418671; Fri, 18 Aug 2017 14:06:58 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!f16no1011298itb.0!news-out.google.com!c139ni1788itb.0!nntp.google.com!m81no670315itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 18 Aug 2017 14:06:58 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8303:2100:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8303:2100:5985:2c17:9409:aa9c References: <79e06550-67d7-45b3-88f8-b7b3980ecb20@googlegroups.com> <9d4bc8aa-cc44-4c30-8385-af0d29d49b36@googlegroups.com> <1395655516.524005222.638450.laguest-archeia.com@nntp.aioe.org> <4527d955-a6fe-4782-beea-e59c3bb69f21@googlegroups.com> <22c5d2f4-6b96-4474-936c-024fdbed6ac7@googlegroups.com> <1919594098.524164165.354468.laguest-archeia.com@nntp.aioe.org> <85d4930c-d4dc-4e4f-af7a-fd7c213b8290@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <725b229b-f768-4603-b564-4751e5e7136f@googlegroups.com> Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language From: Robert Eachus Injection-Date: Fri, 18 Aug 2017 21:06:58 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:47745 Date: 2017-08-18T14:06:58-07:00 List-Id: On Friday, August 11, 2017 at 5:13:44 PM UTC-4, Randy Brukardt wrote: > The problem is that AdaCore's desire to keep this misfeature killed the= =20 > first attempt to allow UTF-8 in file names generally. There needs to be s= ome=20 > way to tell UTF-8 strings from Latin-1 strings (as characters over 128 ar= e=20 > encoded differently); I believe there was a suggestion to use a BOM to do= =20 > this. That would have broken the "free" use in Linux, and it was killed. = So=20 > you guys got nothing. There is an 'elegant' solution. Add a UTF8 character string type. If only= a few places in a program need this instead of Latin-1 strings, a child pa= ckage of Standard with the type declared inside is the way to go. It would= require adding To_UTF8 functions in the same package, but that is a good t= hing. You need three, with parameters of String, Wide_String, and Wide_Wid= e_String types. This gets away from the need for three sets of file operat= ions. I'd probably make UTF8 a private type, and provide two Create and Op= en functions, one taking Latin-1 strings, the other taking UTF8 strings. T= hus: Open(Ada_File, In_File, Some_String); and Open(Ada_File, In_File, To_UTF8(Some_String)); Will open the same file if Some_String contains only lower page characters,= and a quite different file if some upper page characters are included. Oh, a child of UTF8 could provide a subtype of UTF8_String, and operations = on that type. It might even be useful for say Cyrillic. But for Unicode o= r full ISO 10646? I wouldn't want to write or maintain a package like that= , and it sure doesn't belong in the standard.