3 messages in com.mysql.lists.dotnetRE: how set collation_connection in c...| From | Sent On | Attachments |
|---|---|---|
| Jose Manuel | 28 Jan 2005 11:07 | |
| Jorge Bastos | 28 Jan 2005 11:51 | |
| Daniel Fisla | 28 Jan 2005 12:38 |
| Subject: | RE: how set collation_connection in connector/net![]() |
|---|---|
| From: | Daniel Fisla (dfi...@itmatter.com) |
| Date: | 01/28/2005 12:38:36 PM |
| List: | com.mysql.lists.dotnet |
What I did is modified MySql config file in /etc/my.cnf
[mysql] default-character-set = utf8 I am using MySql version 4.1.8 and up.
To create database with utf8 support:
CREATE DATABASE `foo` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin
When creating a table with utf8 support:
CREATE TABLE `bar` (...) DEFAULT CHARSET=utf8 COLLATE=utf8_bin
Next you will need to change your db connection string to include "charset=utf8;" .
You can watch the server log file (assuming you have --debug in your mysql start script in /etc/init.d/) for command "SET NAMES utf8" if you really want to make sure it's setting the client encoding properly.
What I can't figure out is why do some Japanese, Chinese, Arabic and Korean characters come out as ??, wrong encoding, when I set the table and db collation to utf8_general_ci instead of utf8_bin?
I can only get true utf-8 support to work with default collation set to utf_bin when working with TEXT & BLOB fields.
Cheers,
-Daniel.
-----Original Message----- From: Jorge Bastos [mailto:mysq...@decimal.pt] Sent: Friday, January 28, 2005 2:52 PM To: dot...@lists.mysql.com Subject: Re: how set collation_connection in connector/net
did you try utf8 already?
----- Original Message ----- From: "Jose Manuel" <jose...@telefonica.net> To: <dot...@lists.mysql.com> Sent: Friday, January 28, 2005 7:07 PM Subject: how set collation_connection in connector/net
Hello,
I have problems with spanish charset. I think that's problem with collation_connection (ever latin1_swedish_ci)
How set collation_connection to other collation 'for ever' with ?
I'm runnig connector/net 1.0.4 + mysql 4.1.9-nt
Thanks
-- MySQL on .NET Mailing List For list archives: http://lists.mysql.com/dotnet To unsubscribe: http://lists.mysql.com/dotnet?unsub=dfi...@itmatter.com
!DSPAM:41fa9843257817914410426!




