Problem with Cyrillic and UTF-8

Advanced Questions & Problems

Problem with Cyrillic and UTF-8

Postby jdbg » 11:03am, Mon 30 Mar, 2009

Hi,

I have a problem with Cyrillic and establishing a normal utf-8 connection to the database. I need to put the following sql command somewhere in the code of phplist, but don't know where.

Code: Select all
SET NAMES 'utf8'


Can someone give me a hint?

I need to do this because some characters in Cyrillic are not properly stored in the database.

Thanks in advance!
jdbg
phpList newbie
 
Posts: 2
Joined: 11:00am, Mon 30 Mar, 2009

Postby jdbg » 11:56am, Tue 07 Apr, 2009

anyone got any idea?
jdbg
phpList newbie
 
Posts: 2
Joined: 11:00am, Mon 30 Mar, 2009

Re: Problem with Cyrillic and UTF-8

Postby H2B2 » 7:06am, Thu 09 Apr, 2009

Instead of using "SET NAMES", wouldn't this suggestion be an option for you?

to support encoding properly you should add these lines:

mysql_query("SET CHARACTER_SET_CLIENT=utf8");
mysql_query("SET CHARACTER_SET_RESULTS=utf8");
mysql_query("SET CHARACTER_SET_CONNECTION=utf8");


to mysql.inc

ref: viewtopic.php?p=58274#p58274
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: Problem with Cyrillic and UTF-8

Postby lwc » 4:15pm, Fri 29 Jan, 2010

A SET NAMES 'x' statement is equivalent to these three statements


Ref: http://dev.mysql.com/doc/refman/5.0/en/ ... ction.html
lwc
PL Nut
 
Posts: 35
Joined: 3:00pm, Fri 13 Feb, 2009


Return to Advanced Questions & Problems

Who is online

Users browsing this forum: No registered users and 0 guests