berniey / hanziconv

Hanzi Converter for Traditional and Simplified Chinese
Other
180 stars 43 forks source link

help(hanziconv) raise UnicodeEncodeError #6

Open fseasy opened 7 years ago

fseasy commented 7 years ago

when I use help(hanziconv) in interactive console, it raise UnicodeDecodeError, as following,

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site.py", line 459, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/lib64/python2.7/pydoc.py", line 1745, in __call__
    self.help(request)
  File "/usr/lib64/python2.7/pydoc.py", line 1792, in help
    else: doc(request, 'Help on %s:')
  File "/usr/lib64/python2.7/pydoc.py", line 1529, in doc
    pager(render_doc(thing, title, forceload))
  File "/usr/lib64/python2.7/pydoc.py", line 1334, in pager
    pager(text)
  File "/usr/lib64/python2.7/pydoc.py", line 1354, in <lambda>
    return lambda text: pipepager(text, 'less')
  File "/usr/lib64/python2.7/pydoc.py", line 1375, in pipepager
    pipe.write(text)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 141-142: ordinal not in range(128)

may be it is not the program error ? But I don't know how to deal with it.

berniey commented 7 years ago

Sorry to come to this late @memeda. It could maybe your terminal setting. That feature was tested before the release and I've just tested it and it is still working.

Please provide more information on operating environment to move this forward.