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!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: strange behaviour of utf-8 files Date: Mon, 18 Nov 2013 16:25:07 +0100 Organization: cbb software GmbH Message-ID: References: <73e0853b-454a-467f-9dc7-84ca5b9c29b2@googlegroups.com> <1ghx537y5gbfq.17oazom68d4n6.dlg@40tude.net> <9d00683c-949c-4e88-a161-ebd78b350d39@googlegroups.com> <1w23uq33ul2i8$.wzjpp3evot36.dlg@40tude.net> <5288c584$0$6639$9b4e6d93@newsspool2.arcor-online.net> <52891372$0$6636$9b4e6d93@newsspool2.arcor-online.net> <10ec0vuld83fy.1t7bduzwsrfe.dlg@40tude.net> <5289d34e$0$6637$9b4e6d93@newsspool2.arcor-online.net> <528a10a9$0$6564$9b4e6d93@newsspool4.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: IenaDxMXK2hi7fvYcb+MlQ.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:17721 Date: 2013-11-18T16:25:07+01:00 List-Id: On Mon, 18 Nov 2013 14:05:45 +0100, G.B. wrote: > Character literals are not bugs. Ada lacks means of > expressing programmer's intent here, that much is true. > Encoding could be specified by an aspect, just like 'Size. > The language is buggy here, when matched against ubiquitous > real world programming situations. You are fundamentally wrong here. Encoding is not an aspect, encoding is a type. Compare: 123 is a literal of Integer, mod 341, Unsigned_16, ... types "A" is a literal of String (Latin1), Wide_String (UCS-2), Wide_Wide_String (UCS-4) Ada can and surely must have UTF-8 and whatever other encoded strings, characters and slices. The reason why this is not done, because of other language problems irrelevant here. [It would cause combinatorial explosion of standard libraries.] Note, with all and any thinkable additions, the problem OP had will still be present, because it has nothing to do with the language itself. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de