Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th February 2011, 15:56
dar_ek dar_ek is offline
Junior Member
 
Join Date: Oct 2010
Posts: 17
Thanks: 1
Thanked 3 Times in 2 Posts
Question utf8_decode in modules.inc.php (processDatalog)?

Please tell me for what is utf8_decode() in function processDatalog() from lib/classes/modules.inc.php in that code?

//** encode data to utf-8 and unserialize it
if(!$data = unserialize(stripslashes($d['data']))) {
$data = unserialize($d['data']);
}
//** Decode data back to locale
foreach($data['old'] as $key => $val) {
$data['old'][$key] = utf8_decode($val);
}
foreach($data['new'] as $key => $val) {
$data['new'][$key] = utf8_decode($val);
}


Two times, one for "multiserver setup" and one for "single server setup".

I'm asking this because "utf8_decode" here damages all locale character set.
Eg. in autoresponder text. Also in "multiserver setup" section this breaking all locale characters (UTF-8) in replication from master database.

(In my case POLISH characterset).
Reply With Quote
Sponsored Links
  #2  
Old 25th February 2011, 17:43
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,424
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

I've just reviewed the code again, it might indeed be that the lines can be removed now, we had some code there that encoded everything to utf-8 to solve serialization problems, but that code has been removed, so that the decode part might be removed as well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
dar_ek (25th February 2011)
  #3  
Old 25th February 2011, 20:47
dar_ek dar_ek is offline
Junior Member
 
Join Date: Oct 2010
Posts: 17
Thanks: 1
Thanked 3 Times in 2 Posts
 
Default

Thanks for quick answer.

I'll test it, and sing you in case of problems.

Best regards/
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.