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.2 required=3.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS,PDS_FROM_2_EMAILS autolearn=no autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:620a:414a:: with SMTP id k10mr18842271qko.37.1624211921315; Sun, 20 Jun 2021 10:58:41 -0700 (PDT) X-Received: by 2002:a25:75d6:: with SMTP id q205mr25672273ybc.339.1624211921150; Sun, 20 Jun 2021 10:58:41 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 20 Jun 2021 10:58:40 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=2001:8b0:ca:6:0:0:0:fd; posting-account=TiHetgoAAACluCgYkPc8-TWs6dBNgSne NNTP-Posting-Host: 2001:8b0:ca:6:0:0:0:fd References: <491a3435-63c5-464d-83ac-6b82ac39b7d6n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <874bd6ad-df44-4d63-bb6c-9d2941781e6en@googlegroups.com> Subject: Re: XMLAda & unicode symbols From: "196...@googlemail.com" <1963bib@googlemail.com> Injection-Date: Sun, 20 Jun 2021 17:58:41 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62258 List-Id: On Sunday, 20 June 2021 at 18:23:35 UTC+1, Dmitry A. Kazakov wrote: > On 2021-06-20 19:02, 196...@googlemail.com wrote: > > On Saturday, 19 June 2021 at 20:53:49 UTC+1, Jeffrey R. Carter wrote: > >> On 6/19/21 8:28 PM, 196...@googlemail.com wrote: > >>> I'm creating SVG files with XMLAda and I need to have a degree symbol within some text. > >>> > >>> I have: > >>> procedure Add_Min_Max (Min_Max_Str : String; X_Pos : String; Y_Pos : String) is > >> The degree symbol is part of Latin-1, so why not include it directly in your string? > >> > >> S : constant String := "50" & Ada.Characters.Handling.Latin_1.Degree_Sign; > > > > Unfortunately, when XMLAda comes to exporting the DOM tree, it crashed with: > > raised UNICODE.CES.INVALID_ENCODING : unicode-ces-utf8.adb:258 > Maybe it expects UTF-8, as most third party Ada libraries do. In that > case use: > > Character'Val (16#C2#) & Character'Val (16#B0#) 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. I'm sure it's easy enough, and when I get it, I'll be banging my head against the desk.