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:a0c:8563:: with SMTP id n90mr21675008qva.41.1624304456449; Mon, 21 Jun 2021 12:40:56 -0700 (PDT) X-Received: by 2002:a25:75d6:: with SMTP id q205mr32864767ybc.339.1624304456256; Mon, 21 Jun 2021 12:40:56 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 21 Jun 2021 12:40:56 -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> <874bd6ad-df44-4d63-bb6c-9d2941781e6en@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: XMLAda & unicode symbols From: "196...@googlemail.com" <1963bib@googlemail.com> Injection-Date: Mon, 21 Jun 2021 19:40:56 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62270 List-Id: On Sunday, 20 June 2021 at 19:16:57 UTC+1, Dmitry A. Kazakov wrote: > On 2021-06-20 19:58, 196...@googlemail.com wrote:=20 > > On Sunday, 20 June 2021 at 18:23:35 UTC+1, Dmitry A. Kazakov wrote:=20 > >> On 2021-06-20 19:02, 196...@googlemail.com wrote:=20 > >>> On Saturday, 19 June 2021 at 20:53:49 UTC+1, Jeffrey R. Carter wrote:= =20 > >>>> On 6/19/21 8:28 PM, 196...@googlemail.com wrote:=20 > >>>>> I'm creating SVG files with XMLAda and I need to have a degree symb= ol within some text.=20 > >>>>>=20 > >>>>> I have:=20 > >>>>> procedure Add_Min_Max (Min_Max_Str : String; X_Pos : String; Y_Pos = : String) is=20 > >>>> The degree symbol is part of Latin-1, so why not include it directly= in your string?=20 > >>>>=20 > >>>> S : constant String :=3D "50" & Ada.Characters.Handling.Latin_1.Degr= ee_Sign;=20 > >>>=20 > >>> Unfortunately, when XMLAda comes to exporting the DOM tree, it crashe= d with:=20 > >>> raised UNICODE.CES.INVALID_ENCODING : unicode-ces-utf8.adb:258=20 > >> Maybe it expects UTF-8, as most third party Ada libraries do. In that= =20 > >> case use:=20 > >>=20 > >> Character'Val (16#C2#) & Character'Val (16#B0#)=20 > >=20 > > That's the degree symbol, what I really need is the degree centigrade s= ymbol which is U+2103.=20 > >=20 > > Having Character'Val (16#21#) & Character'Val (16#03#) fails at runtime= .=20 > >=20 > > I'm sure it's easy enough, and when I get it, I'll be banging my head a= gainst the desk. > Why do you use XMLAda? SVG is a text file, I would write directly. It is= =20 > the reverse, rendering SVG image, that is difficult to write from scratch= .=20 >=20 > And why do you want to create SVG files? > --=20 > Regards,=20 > Dmitry A. Kazakov=20 > http://www.dmitry-kazakov.de I am using XML/Ada as I wish to do it "properly", it's the way you learn. As for SVG, I am graphing temps, humidity & pressure, and when you zoom in,= it still looks sharp. The previous system I coded in C, used png's which w= ere screwed up when Google screwed up and forced HDPI settings on chrome us= ers. THE svg's will also contain code to highlight etc points.