collective / collective/collective.documentviewer

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)

Open
#25 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
20
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Hi @vangheem

I am using i18ndude for extract the i18n strings using a bash script and when executes show the bellow error:

``` python
(i18ndude)macagua@dacagua:~/proyectos/plone/git/collective.documentviewer/collective/documentviewer/locales$ ./rebuild_i18n.sh
There was an error processing ../templates/documentviewer.pt
Traceback (most recent call last):
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/i18ndude/extract.py", line 500, in tal_strings
metal=False)()
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 266, in __call__
self.interpret(self.program)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 860, in do_useMacro
self.interpret(block)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 907, in do_fillSlot
self.interpret(block)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 853, in do_defineMacro
self.interpret(macro)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 528, in do_optTag_tal
self.do_optTag(stuff)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 513, in do_optTag
return self.no_tag(start, program)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 508, in no_tag
self.interpret(program)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 847, in do_condition
self.interpret(block)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 528, in do_optTag_tal
self.do_optTag(stuff)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 513, in do_optTag
return self.no_tag(start, program)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 508, in no_tag
self.interpret(program)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 847, in do_condition
self.interpret(block)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 528, in do_optTag_tal
self.do_optTag(stuff)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 513, in do_optTag
return self.no_tag(start, program)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 508, in no_tag
self.interpret(program)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 338, in interpret
handlers[opcode](self, args)
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 711, in do_insertTranslation
default = tmpstream.getvalue()
File "/home/macagua/virtualenv/i18ndude/lib/python2.6/site-packages/zope/tal/talinterpreter.py", line 1007, in getvalue
return u''.join(self)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)
```

I am trying to remplace all special characters with ASCII codes into _documentviewer.pt_ file is included in three times the bellow line:

``` xml

```

What kind of special character are you want represent?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.