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=2.5 required=3.0 tests=BAYES_50,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:15d3:: with SMTP id o19mr15064581qkm.481.1624127334830; Sat, 19 Jun 2021 11:28:54 -0700 (PDT) X-Received: by 2002:a25:b90:: with SMTP id 138mr10218602ybl.161.1624127334426; Sat, 19 Jun 2021 11:28:54 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.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: Sat, 19 Jun 2021 11:28:54 -0700 (PDT) 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 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: XMLAda & unicode symbols From: "196...@googlemail.com" <1963bib@googlemail.com> Injection-Date: Sat, 19 Jun 2021 18:28:54 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:62248 List-Id: 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 Text_Node : DOM.Core.Element; Text : DOM.Core.Text; begin Text_Node := DOM.Core.Documents.Create_Element (LDocument, "text"); DOM.Core.Elements.Set_Attribute (Text_Node, "x", X_Pos); DOM.Core.Elements.Set_Attribute (Text_Node, "y", Y_Pos); DOM.Core.Elements.Set_Attribute (Text_Node, "class", "def-maroon"); DOM.Core.Elements.Set_Attribute (Text_Node, "text-anchor", "left"); Text_Node := DOM.Core.Nodes.Append_Child (Root_Node, Text_Node); Text := DOM.Core.Documents.Create_Text_Node (LDocument, Min_Max_Str); Text := DOM.Core.Nodes.Append_Child (Text_Node, Text); end Add_Min_Max; and I just pass a string in. The degree symbol is unicode 00B0 and you would then normally have it as �B0, except if I do, then XMLAda changes that initial '&' to '&' and so what is then coded is '&#00B0' and it fails to display properly. Nor can I apply Unicode.Names.Latin_1_Supplement.Degree_Sign to the string, since, well, strict typing... To me it seems like XMLAda is being far too eager and is not willing to just publish what I enter. I raised a call on the github repository, but it was closed saying basically use the unicode name, which fails. Does anyone have a clue how this can be done?