mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Fix bug that caused errors on systems that do not use UTF-8 encoding
This commit is contained in:
parent
b4c3bcf917
commit
9c85c1b273
@ -253,8 +253,6 @@ class BrowseServer(object):
|
|||||||
lp = self.db.library_path
|
lp = self.db.library_path
|
||||||
if isbytestring(lp):
|
if isbytestring(lp):
|
||||||
lp = force_unicode(lp, filesystem_encoding)
|
lp = force_unicode(lp, filesystem_encoding)
|
||||||
if isinstance(ans, unicode):
|
|
||||||
ans = ans.encode('utf-8')
|
|
||||||
ans = ans.replace('{library_name}', xml(os.path.basename(lp)))
|
ans = ans.replace('{library_name}', xml(os.path.basename(lp)))
|
||||||
ans = ans.replace('{library_path}', xml(lp, True))
|
ans = ans.replace('{library_path}', xml(lp, True))
|
||||||
ans = ans.replace('{initial_search}', initial_search)
|
ans = ans.replace('{initial_search}', initial_search)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user