<div dir="ltr"><div>It seems to me that, in spite of the superficial similarity of the way numbers are written in many languages, this is NOT, in general, a matter of encoding conversion or even transliteration but rather one of translation and therefore not part of Unicode for the same reason that Unicode does not handle the translation of text from, say, Japanese to English.</div><div><br></div><div>There is, actually, a library, which I have written, that handles conversions between Unicode strings and integers for most systems of writing numbers. (I have yet to update it to handle some of the more recently encoded systems.) It is a C library which also has a TCL binding:</div><div><br></div><div style="margin-left:40px"><a href="http://billposer.org/Software/libuninum.html">http://billposer.org/Software/libuninum.html</a></div><div style="margin-left:40px"><br></div><div>It handles a number of systems that require algorithms rather different from that of atoi/strtol.</div><div><br></div><div>Bill</div><div><br></div><div><div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 16, 2020 at 12:04 PM Richard Wordingham via Unicode <<a href="mailto:unicode@unicode.org">unicode@unicode.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 16 Dec 2020 18:34:55 +0100<br>
Frédéric Grosshans via Unicode <<a href="mailto:unicode@unicode.org" target="_blank">unicode@unicode.org</a>> wrote:<br>
<br>
> It’s quite easy to make a lbrary which parses UniccodeData.txt<br>
> (version 13.0 here) and extract the digit ranges of the various<br>
> scripts and convert the various strings into number for the 50<br>
> scripts listed in table 22-3 of the standard plus the western digits<br>
> (Unicode 13.0 pdf here), it should be reasonably furureproof, in the<br>
> sense that parsing future unicode datafile should add stipts as they<br>
> are encoded. However, do not forget to check the exceptions in the<br>
> text around this table in in the relevant script pages: in Unicode<br>
> 13.0, it concerns Arabic, which has to sets of digits, Myanmar (3<br>
> sets), and Tai Tham (2 sets).<br>
<br>
Or just scan UnicodeData.txt for decimal digits with the value 0.<br>
<br>
Richard.<br>
<br>
</blockquote></div>