mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-29 01:59:39 +01:00
fix for mbstring.overload=7, hopefully that works now in all cases
This commit is contained in:
parent
25a30c53c6
commit
291da54d43
@ -60,10 +60,9 @@
|
|||||||
$fp = fopen($fn,'r');
|
$fp = fopen($fn,'r');
|
||||||
while ($data = fgets($fp,8000))
|
while ($data = fgets($fp,8000))
|
||||||
{
|
{
|
||||||
// this is not working if mbstring.overloading = 7 and the content contains a special char
|
// explode with "\t" and removing "\n" with str_replace, needed to work with mbstring.overload=7
|
||||||
// list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));
|
list($message_id,,,$content) = explode("\n",$data);
|
||||||
list($message_id,$app_name,$null,$content) = split("[\t\n]",$data);
|
$this->langarray[strtolower(trim($message_id))] = str_replace("\n",'',$content);
|
||||||
$this->langarray[strtolower(trim($message_id))] = $content;
|
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
@ -405,8 +405,9 @@
|
|||||||
$lines = file($appfile);
|
$lines = file($appfile);
|
||||||
foreach($lines as $line)
|
foreach($lines as $line)
|
||||||
{
|
{
|
||||||
// we realy need to split with tab+cr, as only this works with mbstring.overload=7 !!!
|
// explode with "\t" and removing "\n" with str_replace, needed to work with mbstring.overload=7
|
||||||
list($message_id,$app_name,,$content) = split("[\t\n]",$line);
|
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);
|
$message_id = substr(strtolower(chop($message_id)),0,MAX_MESSAGE_ID_LENGTH);
|
||||||
$app_name = chop($app_name);
|
$app_name = chop($app_name);
|
||||||
$raw[$app_name][$message_id] = $content;
|
$raw[$app_name][$message_id] = $content;
|
||||||
|
Loading…
Reference in New Issue
Block a user