1

Topic: Thinking of translating punBB to UTF-8...

Hello,

Due to subjective reasons, i am thinking about changing punBB`s charset to UTF-8 and translating language files.

I would appreciate any comments about any possible problems/issues.

PHP 4.3.x and MySQL have certain UTF-8 support. However it`s possible that there are some reasons I don`t know, which makes the whole converting process hopeless.

Thanks in advance,
Grey

2 (edited by Jansson 2004-05-13 10:42)

Re: Thinking of translating punBB to UTF-8...

I like the idea of UTF-8. Actually, I've just converted PunBB Resource and Cactuz Network to it.

As I've understand, more and more people are starting to use UTF-8 too.


The only "problem" as I can see, is if you already have a lot of posts in your database in another chaset. But I think that it wouldn't be so hard to fix either.

3

Re: Thinking of translating punBB to UTF-8...

Thanks, Jansson!

I have translated all the language files to utf-8, and so far I have only one issue. When a user is using Russian locale and he is writing a new topic, he receives a message: "Messages must not contain only capital letters and special characters in this forum." on submit.

However, as far i know this check can be disabled in administrator`s options.

Thank you. I am very satisfied with punBB. Cobalt style looks absoulutely stunning! Thank you, again!

Re: Thinking of translating punBB to UTF-8...

I've noticed one little problem though. MySQL doesn't support UTF-8 before 4.1. And 4.1 is not finished yet.

5

Re: Thinking of translating punBB to UTF-8...

I believe you are talking about full unicode support in MySql, however, i guess that I dont need it for simply storing utf-8 content in the database.

So far everything is working and displaying correctly including russian characters. If there will be any issues, I will certainly report them.

Thanks, Grey

Re: Thinking of translating punBB to UTF-8...

There are many issue when dealing with UTF-8 in PHP.

- Flags to handle UTF-8 in all regular expressions must be added.
- UTF-8-compatible regular expressions are only available in 4.2.3 or later on the windows platform.
- Any version of MySQL prior to 4.1.0 does not support UTF-8. See this.
- PHP basically requires the mbstring extension for UTF-8 support.

There are more issues. What version of MySQL are you using?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Thinking of translating punBB to UTF-8...

Well, if you don't use any special characters, it's ok with MySQL < 4.1

8

Re: Thinking of translating punBB to UTF-8...

Rickard,

I am using PHP 4.3.4 + MySQL 3.23.42.

Yes, I know that mySql does not support utf-8. As far I understand, utf-8 support means that the metadata (names of fields, columns, tables) can be in utf-8 form, and utf-8 aware data sorting.
However, for basic data manipulations (store, read, write) as with punBB, there should be no problems. Except search, which seems to not recognize utf-8 two-byte characters.

I found "lang_multibyte" in *common.php, which is set to false. Should I enable it?

Thanks,
Grey

9

Re: Thinking of translating punBB to UTF-8...

Tried to set $lang_multibyte to "true" and search now is working except that search cannot find utf-8 two byte characters with different case (lowercase, uppercase) but that`s understandable.

Re: Thinking of translating punBB to UTF-8...

Yes, I believe converting PunBB to support UTF-8 will require a pretty large overhaul of most functions. It shouldn't be too difficult, but the fact that neither PHP nor MySQL supports it properly in their current stable versions sure is a problem.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

11

Re: Thinking of translating punBB to UTF-8...

I totally agree with your conclusion. Thank you!