Bug 11799 - Continuing Stopped - by files named by non-english characters
: Continuing Stopped - by files named by non-english characters
Status: RESOLVED FIXED
Product: nQa Audiobook Player
General
: unspecified
: N900 Maemo
: High critical (vote)
: ---
Assigned To: Ed Page
: general
:
:
:
:
  Show dependency tree
 
Reported: 2011-01-19 09:17 UTC by jiali_ma
Modified: 2011-02-08 02:58 UTC (History)
1 user (show)

See Also:


Attachments
Proposed fix. basepath is UTF-8 and JSON-Stuff ist unicode (516 bytes, patch)
2011-01-31 20:27 UTC, Enno Gröper
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description jiali_ma (reporter) 2011-01-19 09:17:05 UTC
My Continuing stopped too, and the log says:

( 3589) INFO MainThread.Player.load: continuing book: 02碧血剑
(3590) ERROR MainThread.Player.load: Audiobook was not found Traceback (most
recent call last):
File " /opt/nqaap/lib/Player.py", line 58, in load bookPath = self._bookPaths
[lastBookName]
KeyError: u' 02\u78a7\u8840\u5251 '

Looks like it won't recognize Chinese Characters or any other non english,
because when I changed name to numbers only, it works fine.
Comment 1 Enno Gröper 2011-01-31 17:32:41 UTC
*** Bug 11837 has been marked as a duplicate of this bug. ***
Comment 2 Enno Gröper 2011-01-31 20:27:39 UTC
Created an attachment (id=3274) [details]
Proposed fix. basepath is UTF-8 and JSON-Stuff ist unicode

My patch assumes, that basepath encoding is utf8, which should be standard.
But some kind of check would, of course, be better.
btw: It seems to me, that the codecs-Stuff in FileStorage.py is not needed.
In my tests on an Ubuntu 10.10 resuming worked with my patch.
The codec-Stuff in FileStorage.py made no difference (tested with + w/o).

The cause of the error is, that _bookPaths contains UTF-8 Strings and the
JSON-Stuff is unicode (\xc3\xbc vs. \xfc for the german ü).
Comment 3 Ed Page 2011-02-08 02:58:11 UTC
This should now be fixed