When using Unicode character \u00A0 (non-breaking whitespace) in a strings.xml, I get the crash below. Anything wrong with my configuration (if there is any) or any quick fix for that?
u'00A0'
u'00A0'
u'00A0'
[failed] locale/strings.pot
Traceback (most recent call last):
File "/usr/local/bin/a2po", line 3, in
android2po.run()
File "/usr/local/lib/python2.7/dist-packages/android2po/program.py", line 227, in run
sys.exit(main(sys.argv) or 0)
File "/usr/local/lib/python2.7/dist-packages/android2po/program.py", line 215, in main
command_result = cmd.execute()
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 464, in execute
self.generate_templates()
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 293, in generate_templates
kind, do_write=True, update=update)
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 264, in make_or_get_template
xmldata = read_xml(action, self.env.default.xml(kind))
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 63, in read_xml
return convert.read_xml(filename, warnfunc=action.message, **kw)
File "/usr/local/lib/python2.7/dist-packages/android2po/convert.py", line 370, in read_xml
text, formatted = get_element_text(tag, name, warnfunc)
File "/usr/local/lib/python2.7/dist-packages/android2po/convert.py", line 310, in get_element_text
converted_value, elem_formatted = convert_text(t)
File "/usr/local/lib/python2.7/dist-packages/android2po/convert.py", line 242, in convert_text
return "".join(text[:-1]), formatted
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128)
When using Unicode character \u00A0 (non-breaking whitespace) in a strings.xml, I get the crash below. Anything wrong with my configuration (if there is any) or any quick fix for that?
u'00A0'
u'00A0'
u'00A0'
[failed] locale/strings.pot
Traceback (most recent call last):
File "/usr/local/bin/a2po", line 3, in
android2po.run()
File "/usr/local/lib/python2.7/dist-packages/android2po/program.py", line 227, in run
sys.exit(main(sys.argv) or 0)
File "/usr/local/lib/python2.7/dist-packages/android2po/program.py", line 215, in main
command_result = cmd.execute()
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 464, in execute
self.generate_templates()
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 293, in generate_templates
kind, do_write=True, update=update)
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 264, in make_or_get_template
xmldata = read_xml(action, self.env.default.xml(kind))
File "/usr/local/lib/python2.7/dist-packages/android2po/commands.py", line 63, in read_xml
return convert.read_xml(filename, warnfunc=action.message, **kw)
File "/usr/local/lib/python2.7/dist-packages/android2po/convert.py", line 370, in read_xml
text, formatted = get_element_text(tag, name, warnfunc)
File "/usr/local/lib/python2.7/dist-packages/android2po/convert.py", line 310, in get_element_text
converted_value, elem_formatted = convert_text(t)
File "/usr/local/lib/python2.7/dist-packages/android2po/convert.py", line 242, in convert_text
return "".join(text[:-1]), formatted
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128)