Content server: Fix bug that caused errors on systems that do not use UTF-8 encoding

This commit is contained in:
Kovid Goyal 2010-10-31 09:28:37 -06:00
parent b4c3bcf917
commit 9c85c1b273

View File

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