2007/7/6, Ed Leafe <[EMAIL PROTECTED]>: > Are you sure that SQLite needs UTF-8? Or does it just need a > properly encoded unicode value? > >
Yes, according to http://www.sqlite.org/capi3ref.html#sqlite3_open Quote: "Note to windows users: The encoding used for the filename argument of sqlite3_open() must be UTF-8, not whatever codepage is currently defined. Filenames containing international characters must be converted to UTF-8 prior to passing them into sqlite3_open()." And sqlite3 doesn't do the conversion automagically: >>> c=sqlite3.connect(u"\xf6") Traceback (most recent call last): File "<pyshell#9>", line 1, in <module> c=sqlite3.connect(u"\xf6") UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 0: ordinal not in range(128) >>> c=sqlite3.connect(u"\xf6".encode("utf-8")) >>> c <sqlite3.Connection object at 0x00BBEA20> Wolfram _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]
