Changeset 3392
- Timestamp:
- 07/10/08 21:29:30 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/branches/1.26_fixes/pykota/tool.py
r3188 r3392 46 46 def detectCharset(text) : 47 47 """Fakes a charset detection if the chardet module is not installed.""" 48 return " ISO-8859-15"48 return "UTF-8" 49 49 else : 50 50 def detectCharset(text) : 51 51 """Uses the chardet module to workaround CUPS lying to us.""" 52 return chardet.detect(text)["encoding"] 52 return chardet.detect(text)["encoding"] or "UTF-8" 53 53 54 54 from pykota import config, storage, logger