thotkeeper
thotkeeper copied to clipboard
unicode characters in the filename.
What steps will reproduce the problem?
1. using linux, ./thotkeeper
2. file->new
3. choose a unicode filename, such as "pétur"
What is the expected output? What do you see instead?
Expected output would be access to my newly created diary.
Instead i'm kicked back to the first screen.
What version of the product are you using? On what operating system?
Version 0.4.0
Please provide any additional information below.
Console output:
petur@O2:~/Downloads/thotkeeper-0.4.0$ ./thotkeeper
(python:11764): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to
allocate widget with width -5 and height 17
(python:11764): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to
allocate widget with width -5 and height 17
Traceback (most recent call last):
File "./lib/tk_main.py", line 1237, in _FileNewMenu
self._SetDataFile(path, True)
File "./lib/tk_main.py", line 781, in _SetDataFile
self.entries = tk_data.parse_data(datafile)
File "./lib/tk_data.py", line 463, in parse_data
xml.sax.parse(datafile, handler)
File "/usr/lib/python2.6/xml/sax/__init__.py", line 33, in parse
parser.parse(source)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 119, in parse
self.prepareParser(source)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 111, in prepareParser
self._parser.SetBase(source.getSystemId())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 29: ordinal not in range(128)
Feel free to contact me: petur -{at}- petur -{dot}- eu
Original issue reported on code.google.com by [email protected]
on 14 Mar 2010 at 8:25
Looks very similar to the complaint that spawned this thread:
http://readlist.com/lists/python.org/python-list/7/37665.html
Original comment by cmpilato
on 16 Mar 2010 at 7:06
I finally (I know, I know...) took a moment to try to reproduce this problem
myself with an eye on fixing it. But the problem is that I couldn't reproduce
it. On my Linux machine, using 0.4.0, all works as expected. Well, almost. I
do see this warning in my console when I try to "Save As..." a file with
non-ASCII (UTF-8) characters:
UnicodeWarning: Unicode unequal comparison failed to convert both arguments to
Unicode - interpreting them as being unequal
Original comment by cmpilato
on 7 Nov 2014 at 6:02