Re: Charset with hk_classes in Python

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Charset with hk_classes in Python

by tt un :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

A reply to : javier.perez.m@...

I had a similar problem since I  had .mdb files containing cyrillic  characters which I wanted to upload to a mysql database.
I could upload them but then  I only got unreadable characters from the mysql database either in knoda or in Openoffice base program.
It turned out that Mysql was compiled on my distribution (Slackware) with latin1 charset as the internal and default charset of the database daemon -> so I had to reconfigure and recompile the Mysql package with the following configure options :

$ ./configure --prefix=/usr --enable-assembler --with-extra-charsets=all --with-charset=utf8 --enable-thread-safe-client --with-csv-storage-engine --with-archive-storage-engine --with-example-storage-engine --with-blackhole-storage-engine --with-federated-storage-engine --with-openssl-libs=/usr/lib --with-openssl-includes=/usr/include --with-openssl=/usr

in order to get it working properly. The important part is --with-charset=utf8   !

And then in the configuration file of the mysql daemon - /etc/my.cnf I put "default-character-set=utf8" under the [mysqld] and
[client] sections .
And in the start up script for the mysqld I have the following startup options :

$ /usr/bin/mysqld_safe --default-character-set=utf8 --pid-file=/var/run/mysql/mysql.pid $SKIP &

The important part is --default-character-set=utf8   !

This seemed to sort out my problems with charsets.
I hope this can be of any help.
Cheeers,
Todor



What can you do with the new Windows Live? Find out
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Hk-classes-discuss mailing list
Hk-classes-discuss@...
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss

Re: Charset with hk_classes in Python

by Javier Pérez-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Todor,

My MySQL server is right about character encoding (unicode utf-8 with MySQLdb Python libraries). hk_classes is the which one gives me wrong character encoding, not MySQL.

I suppose it is possible to get properly encoded text with hk_classes, because knode, which uses these libraries, shows me the right strings. But I can't find the solution in its documentation.

Thanks for the answer.


On Mon, Feb 23, 2009 at 18:10, tt <todotakov@...> wrote:

A reply to : javier.perez.m@...

I had a similar problem since I  had .mdb files containing cyrillic  characters which I wanted to upload to a mysql database.
I could upload them but then  I only got unreadable characters from the mysql database either in knoda or in Openoffice base program.
It turned out that Mysql was compiled on my distribution (Slackware) with latin1 charset as the internal and default charset of the database daemon -> so I had to reconfigure and recompile the Mysql package with the following configure options :

$ ./configure --prefix=/usr --enable-assembler --with-extra-charsets=all --with-charset=utf8 --enable-thread-safe-client --with-csv-storage-engine --with-archive-storage-engine --with-example-storage-engine --with-blackhole-storage-engine --with-federated-storage-engine --with-openssl-libs=/usr/lib --with-openssl-includes=/usr/include --with-openssl=/usr

in order to get it working properly. The important part is --with-charset=utf8   !

And then in the configuration file of the mysql daemon - /etc/my.cnf I put "default-character-set=utf8" under the [mysqld] and
[client] sections .
And in the start up script for the mysqld I have the following startup options :

$ /usr/bin/mysqld_safe --default-character-set=utf8 --pid-file=/var/run/mysql/mysql.pid $SKIP &

The important part is --default-character-set=utf8   !

This seemed to sort out my problems with charsets.
I hope this can be of any help.
Cheeers,
Todor



What can you do with the new Windows Live? Find out

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Hk-classes-discuss mailing list
Hk-classes-discuss@...
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Hk-classes-discuss mailing list
Hk-classes-discuss@...
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss