Issue 32 in goobook: Encoding problem

6 views
Skip to first unread message

goo...@googlecode.com

unread,
Mar 16, 2012, 5:37:55 AM3/16/12
to goobook...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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.

goo...@googlecode.com

unread,
Mar 16, 2012, 7:36:47 AM3/16/12
to goobook...@googlegroups.com

Comment #1 on issue 32 by h...@furuvik.net: Encoding problem
http://code.google.com/p/goobook/issues/detail?id=32

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

http://www.fileformat.info/info/unicode/char/0161/index.htm

goo...@googlecode.com

unread,
Mar 16, 2012, 8:28:11 AM3/16/12
to goobook...@googlegroups.com

Comment #2 on issue 32 by frantise...@gmail.com: Encoding problem
http://code.google.com/p/goobook/issues/detail?id=32

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 $@

goo...@googlecode.com

unread,
Apr 9, 2012, 3:56:06 PM4/9/12
to goobook...@googlegroups.com
Updates:
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

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.)

goo...@googlecode.com

unread,
Nov 10, 2012, 7:17:57 AM11/10/12
to goobook...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 32 by h...@furuvik.net: Encoding problem
http://code.google.com/p/goobook/issues/detail?id=32

Now uses replace instead of strict error handling.

Reply all
Reply to author
Forward
0 new messages