X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fi18n.php;h=779734dedc7d5679dfeca43e99ab39786ebad64b;hp=15db37f9fe4ac286103c7a4d39e8d1075d13f678;hb=9280dd9deb9ca36a30fa6395671a47f3c844f041;hpb=b4316b34bb52a7dfd042e165226b4f4b975be654 diff --git a/functions/i18n.php b/functions/i18n.php index 15db37f9..779734de 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -197,9 +197,16 @@ function charset_encode($string,$charset,$htmlencode=true) { if (file_exists($encodefile)) { include_once($encodefile); $ret = call_user_func('charset_encode_'.$encode, $string); - } else { + } elseif(file_exists(SM_PATH . 'functions/encode/us_ascii.php')) { + // function replaces all 8bit html entities with question marks. + // it is used when other encoding functions are unavailable include_once(SM_PATH . 'functions/encode/us_ascii.php'); $ret = charset_encode_us_ascii($string); + } else { + /** + * fix for yahoo users that remove all us-ascii related things + */ + $ret = $string; } /**