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!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: unicode and wide_text_io Date: Thu, 28 Dec 2017 13:06:57 +0200 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net OVHB3QQHfcaATClB2GuiUg1Vpmc/3J0ElibqbbbMQRv4nOw95N Cancel-Lock: sha1:0a1j2ET+7QiPw7N9p9hbEegXcIM= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:49670 Date: 2017-12-28T13:06:57+02:00 List-Id: On 17-12-28 11:04 , Dmitry A. Kazakov wrote: > On 2017-12-27 23:32, Mehdi Saada wrote: [snip] >> Superscripts and subscripts means more change in the IO package. >> Before I could simply use the generic Integer_IO, but I have no clue >> how to do to output a specific code point for each digit in a >> specific base... wouldn't that mean rewriting part of Integer_IO ? > > You mean the standard library Integer_IO? Sure, you will have to replace > it. It seems simpler to continue using Integer_IO, but to Put the number into a String, and then translate the digits in the resulting String into superscript or subscript form, as desired. The translation for decimal digits 0..9 seems quite simple (https://en.wikipedia.org/wiki/Superscripts_and_Subscripts). Using the Unicode "fraction slash" seems less reliable, to judge from the hints in https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts: "Some browsers support this". -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .