How can I parse a string of fullwidth unicode integer characters to an integer in ruby?
Attempting the obvious results in;
irb(main):011:0> a = "\uff11"
=> "1"
irb(main):012:0> Integer(a)
ArgumentError: invalid value for Integer: "\xEF\xBC\x91"
from (irb):12:in `Integer'
from (irb):12
from /export/home/henry/apps/bin/irb:12:in `<main>'
irb(main):013:0> a.to_i
=> 0
The equivalent in python gives;
>>> a = u"\uff11"
>>> print a
1
>>> int(a)
1