- global $default_charset;
-
- if (strtolower($default_charset) == 'tis-620')
- return $string;
-
- /* Only do the slow convert if there are 8-bit characters */
- /* there is no 0x80-0x9F letters in TIS620 */
- if ( ! ereg("[\241-\377]", $string) )
+ // don't do decoding when there are no 8bit symbols
+ if (! sq_is8bit($string,'tis-620'))