From 3e7af21f7059fd541d889cd0d608283720f8885c Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 26 Dec 2010 00:31:10 +0900 Subject: [PATCH] unihandecode: missing imports --- src/calibre/utils/filenames.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/utils/filenames.py b/src/calibre/utils/filenames.py index c79f3a6b64..094782493e 100644 --- a/src/calibre/utils/filenames.py +++ b/src/calibre/utils/filenames.py @@ -8,9 +8,11 @@ from math import ceil from calibre import sanitize_file_name from calibre.constants import preferred_encoding, iswindows -udc = Unidecoder() +from calibre.ebooks.unihandecode import Unihandecoder +from calibre.utils.config import prefs def ascii_text(orig): + udc = Unihandecoder(lang=prefs['language']) try: ascii = udc.decode(orig) except: