utf8_decode in modules.inc.php (processDatalog)?

Discussion in 'Developers' Forum' started by dar_ek, Feb 25, 2011.

  1. dar_ek

    dar_ek New Member

    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).
     
  2. till

    till Super Moderator

    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.
     
  3. dar_ek

    dar_ek New Member

    Thanks for quick answer.

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

    Best regards/
     

Share This Page