NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is six + three?

Go back

Topic review (newest first)

Waccoon
05-24-2007 03:12:48

After installation, go into phpMyAdmin and check the "collation" of each table.  This will let you know if the tables are actually set to the proper charset.  For some reason, MySQL will sometimes not set the charset properly, even if UTF-8 is the default.

mayshing
05-23-2007 10:33:26

My board is a new one, so I will just reinstall it then. tongue

Waccoon
05-23-2007 05:01:32

Changing the database charset after the board has been installed is a pain.

Basicly, you'll need to use a database maintenance tool, such as phpMyAdmin, to change the default charset.  Which charset to use is a bit confusing, as I still haven't figured out the compatibility differences between charsets.  I believe "utf8_general_ci" is compatible with both traditional and simplified Chinese characters.  That's what I'm using on my system, and everything seems to work fine.

If this is a brand new board, I'd recommed that you clear it, and re-install.  Delete the database to get rid of exisiting tables, and create a new, empty database.  You should have the option to define the charset you want when you create the database.  If not, to change the charset, go into phpMyAdmin, select the database, click the "Operations" tab, and where it says "Collation", select "utf8_general_ci" and then click the "Go" button.  You may then install the board as normal.

If the board is already installed and has pictures/comments, you'll need to re-import the database.  Do not delete ANY files from the server -- we'll only be changing the database.  Go into phpMyAdmin, select the database, and click the "Export" tab.  Make sure you either have NONE of the tables selected in the "Export" box, or ALL the tables selected, otherwise you will export only one table.  Click the "Save as file" checkbox at the bottom of the screen, and click the "Go" button.  Save this file to your computer.  Once you have a database backup, click the red "Drop" button at the top of the screen.  Create a new database with the same name as the old one.  Change the default charset as described above.  Click the "Import" tab, then the "Browse" tab, and give it the database backup you just made.  After the database has been restored, it should now all be in UTF-8.

There is a possiblity that the export will explicitly define your old charset and thus the re-import will not be converted.  Other than editing the database backup by hand, I don't know how to get around this.  Like I said, it's a pain.

mayshing
05-22-2007 21:42:31

OK.... I have 1.3.7, but I still have the same problem... worst of all, I am a coding idiot. ^^bb
I would appreciate your help.

lycosme
05-20-2007 20:50:50

Maybe you are not very clear about the difference between Traditional Chinese (Big5) and Simplified Chinese. Both of them are used in Great China, but charsets are different.
Traditional Chinese is used in HongKong, Taiwan and some other regions, while Simplified Chinese is mainly used in Mainland China.
If you've noticed language packs of other software, most of them have two Chinese language packs, such as phpBB,punBB(our forum is using punBB smile).

Check it out here:
http://www.phpbb.com/languages/?type=20x
http://punbb.org/downloads.php

So it's necessary to  put two Chinese language packs in language folder.

Waccoon
05-20-2007 20:01:19

Please note that there's already a Chinese (Big5) translation, as well as Chinese Simplified.  I have to update the site so language packs and templates may be downloaded seperately.

lycosme
05-20-2007 01:18:57

Thanks for your tips.

It's ok now.

Here is my solution:

1. Add a line to the file dbconn.php:

    $dbconn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect to the MySQL database.');
        mysql_query("SET NAMES 'GBK'",$dbconn); // Added line
    $mySQLDB = mysql_select_db($dbname);

2.Add what you gave above to the language pack.

<meta http-equiv="Content-type" content="text/html; charset=utf-8/gbk">
<meta http-equiv="Content-language" content="zh-cn">

Thanks, I'm doing my translation now. smile

Waccoon
05-19-2007 20:54:52

Welcome to the wide world of language conflicts.

First, let's look at the database issue:

I've found that MySQL handles international characters pretty well because it is usually set to UTF-8 by default.  If your database is set to Latin-1, you may have to change it to UTF-8.  The Chinese and Chinese Simplified language packs I'm using on my test board will accept Chinese characters just fine with UTF-8 encoding.

For the most part, character display issues are handled by the character set, and not the actual data that's sent to the database.  In other words, no matter what the default charset, the data saved in the database should always be the same.  So, if the database isn't explicitly set for Chinese-compatible encoding, the text should still be usable.  It's just the responsibility of the web browser to display the text correctly.  All that matters is that text is not "clipped".

What database tool are you using to check comments in the database?  Some database tools don't support international encoding properly, either.

Now, on to browser support:

Some servers will not parse the "http-equiv" metatag, and therefore it would be necessary to add a proper http header to the code.  Some browsers will also ignore the metatags for language encoding and will only observe http headers.  Language support is unfortunately quite a mess.

I've been experimenting with language support since Kevin gave me his Chinese translations, and Wacintaki 1.3.7 will support both http headers and embedded tags.  If you continue to have problems, you might want to wait for the official 1.3.7 patch, which should be out this weekend.

For now, you could try a different encoding and adding a language.  According to your page source, your charset is "gb2312", and the default language is blank.  I'm not sure how widely BG2312 is supported compared to Big5.  Try these tags and see if it makes a difference:

Code:

Chinese (Taiwan):

<meta http-equiv="Content-type" content="text/html; charset=big5">
<meta http-equiv="Content-language" content="zh-hk">

Code:

Chinese Simplified:

<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta http-equiv="Content-language" content="zh-cn">
lycosme
05-19-2007 08:12:55

MySQL version is 5.0.27-log

The existent comments can't be displayed correctly,  comments can't be written into the database correctly neither.

I've noticed that MySQL 5.0+ is supported in Wacintaki 1.3.6, but why I got the problem?

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB