From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!fdc2.netnews.com!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx02.ams4.POSTED!not-for-mail From: Spiros Bousbouras Newsgroups: comp.lang.ada Subject: Re: XMLAda & unicode symbols Message-ID: References: <491a3435-63c5-464d-83ac-6b82ac39b7d6n@googlegroups.com> <874bd6ad-df44-4d63-bb6c-9d2941781e6en@googlegroups.com> In-Reply-To: X-Organisation: Weyland-Yutani Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: http://netreport.virginmedia.com NNTP-Posting-Date: Tue, 22 Jun 2021 00:30:39 UTC Organization: virginmedia.com Date: Tue, 22 Jun 2021 00:30:39 GMT X-Received-Bytes: 1877 Xref: reader02.eternal-september.org comp.lang.ada:62279 List-Id: On Mon, 21 Jun 2021 12:49:01 -0700 (PDT) "196...@googlemail.com" <1963bib@googlemail.com> wrote: > On Monday, 21 June 2021 at 16:37:21 UTC+1, Simon Wright wrote: > > "196...@googlemail.com" <196...@googlemail.com> writes: > > > > > That's the degree symbol, what I really need is the degree centigrade > > > symbol which is U+2103. > > > > > > Having Character'Val (16#21#) & Character'Val (16#03#) fails at runtime. > > That's because the utf-8 encoding is 3 octets, 0xE2 0x84 0x83 > > Yup, that works, but just how the heck do you get from U+2103 to those 3 octets? If you don't mind downloading and compiling a small C programme you can use my own http://vlaho.ninja/prog/#literal .If you name the executable lit then lit -h u2103h gives E2 84 83 > I can see from http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=2103&mode=hex that it gives it.