- global $default_charset;
-
- if (strtolower($default_charset) == 'us-ascii')
- return $string;
-
- if (! ereg("[\200-\237]", $string) and ! ereg("[\241-\377]", $string) )
+ // don't do decoding when there are no 8bit symbols
+ if (! sq_is8bit($string,'us-ascii'))