Log in

View Full Version : Website charset vs. database collation


Ethelbert
07-25-2011, 06:49 PM
Hello,
I hope that someone will give me good answer to me :)

My database had 2 collations: latin2_czech_cs and utf8_general_ci... I have transferred everything to utf8_general_ci...Everything works great, but I have one issue...

My language and entire site is in iso-8859-2
DB is is utf8_general_ci
my config.php contain collation latin2

How is possible that everything works without problem? Without any character problem? When I change website charset to utf8, everything is broken... How can chat everything to utf8?

kh99
07-26-2011, 12:42 AM
I don't know what you mean when you say "my config.php contain collation latin2" - I see a way to set the charset in the config.php but not the collation.

Anyway, I don't really know much about charsets and collation, but I had a look at the vb code and the MySQL manual and I think what you have works because the MySQL server translates the results from the database before sending them. If this is correct, then you should be able to change to utf8 by adding $config['Mysqli']['charset'] = 'utf8'; in your config.php.

Ethelbert
07-27-2011, 05:19 PM
This is inside my config.php
$config['Mysqli']['charset'] = 'latin2';

Database is saying, that content is in utf8_general_ci.... My language is in iso-8859-2... When I change it to utf8 and charset in the config.php change to utf8, my website is broken...

How can I convert my DB and website to UTF8?

Konstantinos
07-28-2011, 04:31 AM
This is inside my config.php
$config['Mysqli']['charset'] = 'latin2';

Database is saying, that content is in utf8_general_ci.... My language is in iso-8859-2... When I change it to utf8 and charset in the config.php change to utf8, my website is broken...

How can I convert my DB and website to UTF8?

http://www.vbulletin.com/forum/showthread.php?320866-vB-4.0-UTF-8-support-Upgrade-from-3.8x&p=1816873&viewfull=1#post1816873