mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Fix (maybe) an error on some windows computers with a non-standard default encoding
See http://www.mobileread.com/forums/showthread.php?t=235366
This commit is contained in:
parent
606ee69582
commit
a33265cf46
@ -47,6 +47,10 @@ class DispatchController(object): # {{{
|
|||||||
aw = kwargs.pop('android_workaround', False)
|
aw = kwargs.pop('android_workaround', False)
|
||||||
if route != '/':
|
if route != '/':
|
||||||
route = self.prefix + route
|
route = self.prefix + route
|
||||||
|
if isinstance(route, unicode):
|
||||||
|
# Apparently the routes package chokes on unicode routes, see
|
||||||
|
# http://www.mobileread.com/forums/showthread.php?t=235366
|
||||||
|
route = route.encode('utf-8')
|
||||||
elif self.prefix:
|
elif self.prefix:
|
||||||
self.dispatcher.connect(name+'prefix_extra', self.prefix, self,
|
self.dispatcher.connect(name+'prefix_extra', self.prefix, self,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user