Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Canvas Unicode sign lister Date: Sun, 19 Jul 2020 20:58:50 +0100 Organization: A noiseless patient Spider Lines: 24 Message-ID: <87v9ijp98l.fsf@bsb.me.uk> References: <1rn5i2rstz0fb.1qjksyko9cd23.dlg@40tude.net> <8c2432e2-05fa-4893-a19c-55b1b3b85f90o@googlegroups.com> <9e41a176-1061-43c5-b558-9dc801a77349o@googlegroups.com> <91adaad0-faa3-4369-94fc-e3035ae6f5f6o@googlegroups.com> <67f2ad78-faef-4305-9c9c-1644f1ad44e8o@googlegroups.com> <40irtjzhnqkw$.qzm3alh1hfc7$.dlg@40tude.net> <2d65a581-c20d-4174-9523-1bb10aa181f0o@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="419824d348f2f77b7066da699ffe6b2b"; logging-data="7690"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1877rVRVTcsSHst3K2MN0w5JBRozhF0bg4=" Cancel-Lock: sha1:hnCSiwPhY2aReOVgUGJ3/Kmii+I= sha1:Ix4lf8JruGt7rjzf+E+Lra90DlM= X-BSB-Auth: 1.6b04cf56d29c875d7861.20200719205850BST.87v9ijp98l.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:38552 Jonas Thörnvall writes: > Den söndag 19 juli 2020 kl. 15:47:14 UTC+2 skrev JJ: >> On Sat, 18 Jul 2020 08:45:58 -0700 (PDT), Jonas Thörnvall wrote: >> > >> > I just can't figure out howto escape the backslash >> > ustring='"\\u{'+hexString+'}"'; >> >> It's not possible to dynamically create a `\u` or `\x` escaped character >> where the character code is from separate source. Unless `eval()` or similar >> method is used. >> >> Use `String.fromCodePoint()` instead. > > Hello JJ, thanks for trying but 119704 using 119704 is not 0x1d122. That's 119074. $ nodejs > String.fromCodePoint(119074) === "\u{1d122}" true -- Ben.