locale.getpreferredencoding() to get user's charset.
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@50
fdd5c36f-1aea-0310-aeeb-
c58d7e2b6c23
"""
Parser for Netscape Navigator's and Mozilla's bookmarks.html
- Written by BroytMann. Copyright (C) 1997-2004 PhiloSoft Design
+ Written by BroytMann. Copyright (C) 1997-2005 PhiloSoft Design
"""
else:
global DEFAULT_CHARSET
DEFAULT_CHARSET = sys.getdefaultencoding()
+ if DEFAULT_CHARSET == "ascii":
+ try:
+ import locale
+ except ImportError:
+ pass
+ else:
+ DEFAULT_CHARSET = locale.getpreferredencoding()
def start_title(self, attrs):