// use automatic charset detection, if function call asks for it
if ($charset=='auto') {
- global $default_charset;
+ global $default_charset, $squirrelmail_language;
set_my_charset();
$charset=$default_charset;
+ if ($squirrelmail_language=='ja_JP') $charset='euc-jp';
}
// Use mbstring only with listed charsets
function sq_substr($string,$start,$length,$charset='auto') {
// use automatic charset detection, if function call asks for it
if ($charset=='auto') {
- global $default_charset;
+ global $default_charset, $squirrelmail_language;
set_my_charset();
$charset=$default_charset;
+ if ($squirrelmail_language=='ja_JP') $charset='euc-jp';
}
$charset = strtolower($charset);
if (function_exists('mb_internal_encoding') &&
function sq_strpos($haystack,$needle,$offset,$charset='auto') {
// use automatic charset detection, if function call asks for it
if ($charset=='auto') {
- global $default_charset;
+ global $default_charset, $squirrelmail_language;
set_my_charset();
$charset=$default_charset;
+ if ($squirrelmail_language=='ja_JP') $charset='euc-jp';
}
$charset = strtolower($charset);
if (function_exists('mb_internal_encoding') &&
function sq_strtoupper($string,$charset='auto') {
// use automatic charset detection, if function call asks for it
if ($charset=='auto') {
- global $default_charset;
+ global $default_charset,$squirrelmail_language;
set_my_charset();
$charset=$default_charset;
+ if ($squirrelmail_language=='ja_JP') $charset='euc-jp';
}
$charset = strtolower($charset);
if (function_exists('mb_strtoupper') &&