Error encoding in the edit record content

Please report bugs here!

Moderator: Thorsten

Post Reply
telexpress
Posts: 5
Joined: Mon Aug 30, 2010 11:46 am

Error encoding in the edit record content

Post by telexpress »

After our phpmyFAQ upgrade to 2.6.8, user could not see the content in Chinese normally in edit record page.
I found the difference between 2.6.7 and 2.6.8 in record.edit.php.
On line 225
phpmyfaq 2.6.8
<?php if (isset($faqData['content'])) { print trim(PMF_String::htmlentities($faqData['content'])); } ?>

phpmyfaq 2.6.7
<?php if (isset($faqData['content'])) { print trim(PMF_String::htmlspecialchars($faqData['content'])); } ?>

After I modified the 2.6.8 record.edit.php to use htmlspecialchars instead htmlentities, it shows Chinese correctlly.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Error encoding in the edit record content

Post by Thorsten »

Hi,

your reverted fix breaks some other stuff... Which PHP Version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
telexpress
Posts: 5
Joined: Mon Aug 30, 2010 11:46 am

Re: Error encoding in the edit record content

Post by telexpress »

:shock: :(
Our PHP Version is 5.2.10
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Error encoding in the edit record content

Post by Thorsten »

Hi,

okay, and which database are you using? Which charset and which collation do you use if you're using MySQL?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
telexpress
Posts: 5
Joined: Mon Aug 30, 2010 11:46 am

Re: Error encoding in the edit record content

Post by telexpress »

Hi
Our database enviroment is as the following.
Server : Mysql 5.4.3
Charset : utf8
collation utf8_general_ci
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Error encoding in the edit record content

Post by Thorsten »

Hi,

interesting, should be all okay... is it possible to get a dump of your database to check this issue?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply