• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

[FIX] Problem with nickname

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
5 posts • Page 1 of 1

Postby guoxianghao » Sun Feb 12, 2006 7:45 pm

Great web chat app!
When Chinese chat contents was typed in, it works as mentioned.
However, it seems that the nickname can't be assigned to a Chinese string this way:

$params["nick"]='莫人';
$chat = new phpFreeChat( $params );


IE will pop up a window saying "the XML response returned from the server can not be processed", and the nickname not properly displayed. What's more, more windows carrying the same information may appear.

What happened and how to fix the problem?
Thanks!
guoxianghao
New member
 
Posts: 9
Joined: Sun Feb 12, 2006 7:06 pm
Location: China
Top

Postby phpfreechat » Sun Feb 12, 2006 8:54 pm

What encoding are you using to edit the file ?
(by default phpfreechat handles UTF-8 strings)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby guoxianghao » Mon Feb 13, 2006 1:55 am

The encoding system to edit the file is GB2312, where two high ASCII chars(>0x80) representing one Chinese char. For example, 0xC4 0xAA represents Chinese char '莫'.

BTW, if I translate some information in phpfreechat( for instance, 'xx changes his nickname to yy') into Chinese, it can't be displayed correctly, only some "??????" is shown. Is this also the encoding issue? How to fix it ? Thanks a lot!
guoxianghao
New member
 
Posts: 9
Joined: Sun Feb 12, 2006 7:06 pm
Location: China
Top

Postby phpfreechat » Mon Feb 13, 2006 9:15 am

Ok so try to convert your string before passing it to pfc, something like this (you need iconv php module installed) :
Code: Select all
$params["nick"] = iconv("GB2312", "UTF-8", '莫人');

If it doesn't work try to save your php source file directly in UTF-8.

About message translation, I suggest to :
1 . wait for 0.7 release because I just added a i18n ressources system (be carefull: ressources files *must* be encoded in utf-8)
2. try with the lastest subversion at http://www.phpfreechat.net/svn
Moreover I will be please to integrate your chinese translations in pfc official release.

Keep me informed.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby guoxianghao » Tue Feb 14, 2006 2:06 am

Chinese translation posted :
http://www.phpfreechat.net/forum/viewtopic.php?id=14
If there's any problem, do not hesitate to contact with me.
guoxianghao
New member
 
Posts: 9
Joined: Sun Feb 12, 2006 7:06 pm
Location: China
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 16 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub