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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: unicode and wide_text_io Date: Thu, 28 Dec 2017 18:15:48 +0000 Organization: A noiseless patient Spider Message-ID: References: <892d5b9a-6460-419a-a09d-d00a4b84c668@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="ea0091a2e59664c1c018e961882bc7ce"; logging-data="17649"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9rOMz6QTJ3FmyD0tHdk47w5y0yn888F0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:OjR5EWmOfWdrRawWvEEueHYpCZw= sha1:/Q5AkbWEWuHVnuHpUkkBaCJbKj8= Xref: reader02.eternal-september.org comp.lang.ada:49681 Date: 2017-12-28T18:15:48+00:00 List-Id: Niklas Holsti writes: > On 17-12-28 16:32 , Simon Wright wrote: >> "Dmitry A. Kazakov" writes: >>> Take this program: >>> ------------------------------------ >>> with Ada.Text_IO; use Ada.Text_IO; >>> procedure Superscript is >>> begin >>> Put_Line >>> ( "Superscript 1=" >>> & Character'Val (194) >>> & Character'Val (185) >>> ); >>> end Superscript; >>> ------------------------------------ >> >> works fine on macOS (no chcp messing needed!) > > Depends on the Preferences (-> Settings -> Advanced: Character > encoding) you set for the Mac Terminal program. While UTF-8 is one of > the available encodings, I normally have it set to Latin-1, to match > Ada and GNAT. Latin-1 is fine for the languages I mostly use (English, > Swedish, Finnish). I dare say you can do something similar under Linux? The setting is in Preferences -> Profiles -> Advanced on High Sierra, and Unicode (UTF-8) is what I have set; I don't recall changing it, so I guss it's the default.