Changeset 3246 for pykota/trunk

Show
Ignore:
Timestamp:
09/04/07 17:55:45 (17 years ago)
Author:
jerome
Message:

It seems chardet returns None for some people...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r3188 r3246  
    5050    def detectCharset(text) : 
    5151        """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" 
    5353 
    5454from pykota import config, storage, logger