diff --git a/phpgwapi/inc/class.setup_translation.inc.php b/phpgwapi/inc/class.setup_translation.inc.php index f421f3984f..3379b7f24f 100644 --- a/phpgwapi/inc/class.setup_translation.inc.php +++ b/phpgwapi/inc/class.setup_translation.inc.php @@ -60,10 +60,9 @@ $fp = fopen($fn,'r'); while ($data = fgets($fp,8000)) { -// this is not working if mbstring.overloading = 7 and the content contains a special char -// list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1)); - list($message_id,$app_name,$null,$content) = split("[\t\n]",$data); - $this->langarray[strtolower(trim($message_id))] = $content; + // explode with "\t" and removing "\n" with str_replace, needed to work with mbstring.overload=7 + list($message_id,,,$content) = explode("\n",$data); + $this->langarray[strtolower(trim($message_id))] = str_replace("\n",'',$content); } fclose($fp); } diff --git a/phpgwapi/inc/class.translation_sql.inc.php b/phpgwapi/inc/class.translation_sql.inc.php index 1379c8ef00..28c81b4cfb 100644 --- a/phpgwapi/inc/class.translation_sql.inc.php +++ b/phpgwapi/inc/class.translation_sql.inc.php @@ -405,8 +405,9 @@ $lines = file($appfile); foreach($lines as $line) { - // we realy need to split with tab+cr, as only this works with mbstring.overload=7 !!! - list($message_id,$app_name,,$content) = split("[\t\n]",$line); + // explode with "\t" and removing "\n" with str_replace, needed to work with mbstring.overload=7 + list($message_id,$app_name,,$content) = explode("\t",$line); + $content=str_replace("\n",'',$content); $message_id = substr(strtolower(chop($message_id)),0,MAX_MESSAGE_ID_LENGTH); $app_name = chop($app_name); $raw[$app_name][$message_id] = $content;