Chinese Slimpified Chinese Slimpified
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Chinese Slimpified

Started by lwq, January 27, 2006, 07:45:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lwq

Is there any langauge packs for chinese slimplified?The preinstall one is in traditional.

Joachim Müller


hicloud

我用官方的chinese.gb的unicode版转了一个GB2312版的,一般用用还可以,但就是有个小问题,就是注意用户名不能用中文的,一用中文,他就说"用户名至少2个字符",估计是计数函数用得不对,不知有没有哪位解决过这个问题?


I have a slimpified lang file(charset gb2312) translated from official unicode version, an my gallary work well with it except that I cannot use Chinese username. It says that "username must be 2 charactors at least" while my Chinese username is longer than 2. I think it's caused by the function which get the string length, is there anybody has solved this problem by modify the source code for that?

hicloud

I tried to solve the problem of not-use-Chinese-username by modified the usermgr.php as below:

find the line 755:

if (utf_strlen($user_name) < 2) cpg_die(ERROR, $lang_register_php['err_uname_short'], __FILE__, __LINE__);


changed to :
if ($CONFIG['charset'] != 'euc-cn') $user_length=utf_strlen($user_name); else $user_length=strlen($user_name);

if ($user_length < 2) cpg_die(ERROR, $lang_register_php['err_uname_short'], __FILE__, __LINE__);

Then you can use Chinese username under GB2312 charset.

I don't if it will cause other problem or not. If you find any error after using this modification, please tell me. thank you!

Joachim Müller

I filed a bug thread about this - although your fix may work for you, but other non-latin encodings may suffer from the same issues, so this needs to be fixed permanently. See http://forum.coppermine-gallery.net/index.php?topic=27658.0

Joachim Müller

Issue appears to have been solved. Upgrading to the most recent coppermine version should fix this. Marking thread accordingly.