Chinese input for python and MySQL
Robin Munn
rmunn at pobox.com
Fri Nov 21 10:43:25 EST 2003
tinmean <tinmean.bbs at wretch.csie.nctu.edu.tw> wrote:
> hi,
>
> I have some problem when I use MySQLdb.connect.cursor()
>
> to create some Chinese(Big5) strings data, but it is no use.
>
> The reference is from the Deitel's "How to program:Python".
>
> The code can't work when the strings are Chinese.
>
> Thanks
>
> --Tinmean
You haven't given us enough information to help you. What do you mean
when you say "the code can't work"? Does it throw an exception? Which
one? What's the exact error message? Or does the code work but return
the wrong result? If that's the case, give us an example run: the input
data, what the correct result *should* be, and what the result you're
actually getting is.
How are you creating the strings? Are you using Unicode? (You should
be.) See http://www.reportlab.com/i18n/python_unicode_tutorial.html to
get started if you're not.
Read http://www.catb.org/~esr/faqs/smart-questions.html then come back
and ask your question again.
--
Robin Munn
rmunn at pobox.com
More information about the Python-list
mailing list