• Welcome to Simple Machines Community Forum. Please login or sign up.
October 18, 2021, 03:24:35 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Converting to utf-8 to properly display Chinese characters

Started by dxyy, December 09, 2008, 12:06:04 PM

Previous topic - Next topic

dxyy

Please have a look at this thread: http://www.simplemachines.org/community/index.php?topic=276866.0

I'd like to know how I should go about converting my forum's database etc to utf-8.

Any help with this would be greatly appreciated. Thanks! :)

CapriSkye

if you want, i can login to your server and take a look. without knowing your server settings (character set etc), it's hard to tell how to fix it. pm me your server detail.

dxyy

Hmm, can you tell me what information you need? I can tell you anything you need to know, but I'd rather take the troublesome way of giving you all the information step by step if necessary than give out my server login details. :(

The database currently uses latin1_swedish_ci and I aware that this should be utf8_general_ci, is that right? I already made some changes on my test forum, but all of the old posts that were not displayed properly still are not displayed properly.

I think what I need to do is to export the database and convert it to utf-8, but I don't know how to do that.

Is there anything else you need to know that is not already in this thread: http://www.simplemachines.org/community/index.php?topic=276866.0

Oh, and I must say I really appreciate your help, thanks! :D

CapriSkye

right, you export the database, convert it to utf-8, alot of text editor will let you do that, for example ultraedit. then import it with utf-8 for mysql. you might need to change mysql's default character set to utf-8 too.

after that download the english utf-8 language pack, assuming you want your forum to be in english (menu etc). i see that your forum defaults to iso-8859-1, you'll need to change that in apache, or html's meta tag. i think that's what caused some user's post to show up gibberish, and some are okay because they are already using utf-8 in their browser. You just need to make sure your users don't need to set the encoding in their browser.

dxyy

Ok, my main problem is that I do not actually know how to convert the database to utf-8.

I've now downloaded ultraedit, could you be so kind as to tell me how to convert my database using ultraedit?

I tried to do it previously and then reimported the database, but I still get the same problem I experienced before --> New posts are not a problem, but all of the old posts are still displayed as gibberish. :(

CapriSkye

i actually don't use ultraedit, just know that it can do it. but usually you just open up the sql export, then save as, the save as screen will let you choose file type etc, one of them should be the encoding. in the same screen if it asks you if you want to enable BOM, uncheck it.

EnricoR

Thank you, that worked for me. I used UTF-8 batch converter though. On my PC text editors tend to say goodbye if I open big files and so did Ultrasurf, but this one worked.

Advertisement: