New issue 32 by frantise...@gmail.com: Encoding problem
http://code.google.com/p/goobook/issues/detail?id=32
What steps will reproduce the problem?
1. try to search, however the error occurs only for some searches
2.
3.
What is the expected output? What do you see instead?
File "/usr/local/bin/goobook", line 9, in <module>
load_entry_point('goobook==1.4alpha4', 'console_scripts', 'goobook')()
File "/usr/local/lib/python2.6/dist-packages/goobook-1.4alpha4-py2.6.egg/goobook/application.py",
line
83, in main
args.func(config, args)
File "/usr/local/lib/python2.6/dist-packages/goobook-1.4alpha4-py2.6.egg/goobook/application.py",
line
112, in do_query
goobk.query(args.query)
File "/usr/local/lib/python2.6/dist-packages/goobook-1.4alpha4-py2.6.egg/goobook/goobook.py",
line
82, in query
print (u'\t'.join((emailaddr, contact.title, extra_str))).encode(ENCODING)
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u0161' in
position 25: ordinal not in range(256)
What version of the product are you using? On what operating system?
Debian 6.0
Please provide any additional information below.
You are trying to print a non latin-1 character on a latin-1 terminal.
The real solution for you is to switch your computer to UTF-8.
What I can do in goobook is to use a replacement character (like "?") when
trying
to print an incompatible character, but as I said, the real solution is for
you to switch to utf-8.
The character you are trying to print is LATIN SMALL LETTER S WITH CARON
As cannot switch the machine encoding. My admin suggested following wrapper
type solution:
#!/bin/bash
export LANG=en_US.utf8
exec /usr/local/bin/goobook $@
Comment #3 on issue 32 by h...@furuvik.net: Encoding problem
http://code.google.com/p/goobook/issues/detail?id=32
(No comment was entered for this change.)