import sys
from sqlobject import SQLObjectNotFound, sqlhub
from sqlobject.sqlbuilder import Insert
-from m_lib.defenc import default_encoding
+from xsetbg_conf import xsetbg_conf
from xsetbg_db import SqliteSequence, XSetBg, xsetbg_db
+fs_encoding = xsetbg_conf.get("images", "fs_encoding")
dump_file = open(sys.argv[1], 'rU')
if xsetbg_db:
id, timestamp, filename = line.strip().split(None, 2)
id = convert_str(id)
timestamp = convert_str(timestamp)
- if default_encoding != 'utf-8':
- filename = filename.decode(default_encoding).encode('utf-8')
+ if fs_encoding != 'utf-8':
+ filename = filename.decode(fs_encoding).encode('utf-8')
values = {'last_shown': timestamp, 'full_name': filename}
if id:
values['id'] = id