16 lines
371 B
PHP
16 lines
371 B
PHP
<?php
|
|
|
|
function i18n_decode_string($str)
|
|
{
|
|
return preg_replace(array("/\\\\\"/", "/\\\\r/", "/\\\\n/", "/\\\\t/"), array("\"", "\r", "\n", "\t"), $str);
|
|
}
|
|
|
|
function i18n_encode_string($str)
|
|
{
|
|
$str = str_replace("\n", '\n', $str);
|
|
$str = str_replace("\r", '\r', $str);
|
|
$str = str_replace("\t", '\t', $str);
|
|
$str = str_replace("\"", '\"', $str);
|
|
return $str;
|
|
}
|