MySQL Insert Unicode Problem
- From: "erikcw" <erikwickstrom@xxxxxxxxx>
- Date: 9 Apr 2007 10:11:56 -0700
Hi,
I'm trying to insert some data from an XML file into MySQL. However,
while importing one of the files, I got this error:
Traceback (most recent call last):
File "wa.py", line 304, in ?
main()
File "wa.py", line 257, in main
curHandler.walkData()
File "wa.py", line 112, in walkData
self.cursor.execute(*sql) #try multi-execute to speed up query.
File "build/bdist.linux-i686/egg/MySQLdb/cursors.py", line 151, in
execute
File "build/bdist.linux-i686/egg/MySQLdb/connections.py", line 247,
in literal
File "build/bdist.linux-i686/egg/MySQLdb/connections.py", line 185,
in unicode_literal
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u20ac'
in position 28: ordinal not in range(256)
What do I need to change to make this work?
Thanks!
Erik
.
- Follow-Ups:
- Re: MySQL Insert Unicode Problem
- From: John Nagle
- Re: MySQL Insert Unicode Problem
- Prev by Date: Re: Database in memory
- Next by Date: Re: Using/finding ODBC and DBI
- Previous by thread: ctypes failing when a library needs another library
- Next by thread: Re: MySQL Insert Unicode Problem
- Index(es):
Relevant Pages
|