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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: unicode and wide_text_io Date: Thu, 28 Dec 2017 18:51:41 -0600 Organization: JSA Research & Innovation Message-ID: References: <023dc29b-dbc5-4fc8-b44f-d748517adec8@googlegroups.com> Injection-Date: Fri, 29 Dec 2017 00:51:42 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="17327"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:49686 Date: 2017-12-28T18:51:41-06:00 List-Id: "Mehdi Saada" <00120260a@gmail.com> wrote in message news:023dc29b-dbc5-4fc8-b44f-d748517adec8@googlegroups.com... ... > Myself: >> there are positions such as Wide_Character'Val(X) doesn't correspond to >> the Xth character in the UNICODE standard ?? > Of course: Character'val(156) to 'val(255) are one byte long, whereas in > UTF8 the corresponding code points are encoded with two bytes. Did I > understood the lesson ? Yup, that's right. And it depends on what the display device is handling as to whether UTF-8 is recognized. If you don't include Dmitry's chcp command on Windows, most likely his program will output garbage. (On my computer, the default code page is 437, which certainly won't display UTF-8 strings!) Randy.