S
S
S0mnium2013-10-11 10:50:13
Python
S0mnium, 2013-10-11 10:50:13

MySql cp1251 -> Jabber utf-8

Please tell me how can I encode the text in cp1251 from the database to utf-8 to send jabber?
I would be very grateful.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
S0mnium, 2013-10-11
@S0mnium

The casket just opened, I get the data in utf8 from the database, then after receiving the data str = unicode (string) the problem is that python did not know in what encoding I received the data.

I
Ilya Sevostyanov, 2013-10-11
@RUVATA

thousands of them - ways. You need to change the encoding at the sending stage, i.e. during the work of some of your program, or do you want to convert directly in the database?

K
KEKSOV, 2013-10-11
@KEKSOV

And what does, say, SQLyog show? I mean in text fields.
In general, you can convert a table using the ALTER TABLE CONVERT TO CHARACTER SET utf8;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question