By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

MySQL and UTF-8

P: n/a
Hi,

I created a table using :

----------------------------------------------------------------------------
CREATE TABLE test(
unicodeText VARCHAR(45) NOT NULL
)
CHARACTER SET utf8 COLLATE utf8_general_ci;
-----------------------------------------------------------------------------

in php, when i need to query for the data, i need to set the character
set per each connection, i.e.

$DB->query("SET NAMES 'utf8'");

however, i expect this is a kind of overhead ? (a roundtrip delay per
connection)

how to perform this automatically?

I tried to set "default-character-set=utf8 " in my.ini but this didn't
help...

thanks.

Jul 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ho******@gmail.com wrote:
Hi,

I created a table using :

----------------------------------------------------------------------------
CREATE TABLE test(
unicodeText VARCHAR(45) NOT NULL
)
CHARACTER SET utf8 COLLATE utf8_general_ci;
-----------------------------------------------------------------------------

in php, when i need to query for the data, i need to set the character
set per each connection, i.e.

$DB->query("SET NAMES 'utf8'");

however, i expect this is a kind of overhead ? (a roundtrip delay per
connection)

how to perform this automatically?

I tried to set "default-character-set=utf8 " in my.ini but this didn't
help...

thanks.
You could try a MySQL usenet group - like comp.databases.mysql.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.