Author vdupras
Recipients resolve1, vdupras
Date 2008-02-19.11:53:44
SpamBayes Score 0.0472268
Marked as misclassified No
Message-id <1203422027.99.0.142636023279.issue2127@psf.upfronthosting.co.za>
In-reply-to
Content
+1 I've been pulling my hair off over this one too. Try this on win32:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.mkdir(u'foo\xe9')
>>> import sqlite3
>>> con = sqlite3.connect(u'foo\xe9\\my.db')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 3:
ordinal not in range(128)
>>> import sys
>>> sys.getfilesystemencoding()
'mbcs'
>>> con = sqlite3.connect(u'foo\xe9\\my.db'.encode(sys.getfilesystemencoding()))

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
sqlite3.OperationalError: unable to open database file
>>> con = sqlite3.connect(u'foo\xe9\\my.db'.encode('utf-8'))
>>>
History
Date User Action Args
2008-02-19 11:53:48vduprassetspambayes_score: 0.0472268 -> 0.0472268
recipients: + vdupras, resolve1
2008-02-19 11:53:48vduprassetspambayes_score: 0.0472268 -> 0.0472268
messageid: <1203422027.99.0.142636023279.issue2127@psf.upfronthosting.co.za>
2008-02-19 11:53:45vdupraslinkissue2127 messages
2008-02-19 11:53:44vduprascreate