How to convert unicode numbers to ints?
<blockquote>
  <p>Arabic and Chinese have their own glyphs for digits.  <code>int</code> works correctly with all the different ways to write numbers.</p>
</blockquote>

<p>I was not able to reproduce the behaviour (python 3.5.0)</p>

<pre><code>&gt;&gt;&gt; from unicodedata import name
&gt;&gt;&gt; name('í í¹¤')
'RUMI DIGIT FIVE'
&gt;&gt;&gt; int('í í¹¤')
ValueError: invalid literal for int() with base 10: 'í í¹¤'
&gt;&gt;&gt; int('äº')  # chinese/japanese number five
ValueError: invalid literal for int() with base 10: 'äº'
</code></pre>

<p>Am I doing something wrong?  Or is the claim simply incorrect (<a href="http://www.jjinux.com/2012/03/pycon-advanced-python-tutorials.html" rel="nofollow">source</a>).  </p>

<p><code>int</code> does not accept all ways to write numbers. It understands digit characters used for positional numeral systems, but neither <a href="http://std.dkuug.dk/jtc1/sc2/wg2/docs/n3087-1.pdf" rel="nofollow">Rumi</a> nor <a href="https://en.wikipedia.org/wiki/Chinese_numerals#Characters_used_to_represent_numbers" rel="nofollow">Chinese</a> numerals are positional. Neither <code>'äºäº'</code> nor two copies of Rumi numeral 5 would represent 55, so <code>int</code> doesn't accept them.</p>

python python-3.x unicode