static function dbCharsetToPhpCharset($in)
    {
        $out = $in;
        switch ($in) {
            case "None":$out = false;
                break;
            case "UTF8":$out = "UTF-8";
                break;
            case "LATIN1":$out = "ISO-8859-1";
                break;
            case "LATIN2":$out = "ISO-8859-2";
                break;
            case "LATIN3":$out = "ISO-8859-3";
                break;
            case "LATIN4":$out = "ISO-8859-4";
                break;
            case "LATIN4":$out = "ISO-8859-4";
                break;
            case "LATIN5":$out = "ISO-8859-9";
                break;
            case "LATIN6":$out = "ISO-8859-10";
                break;
            case "LATIN7":$out = "ISO-8859-13";
                break;
            case "LATIN8":$out = "ISO-8859-14";
                break;
            case "LATIN9":$out = "ISO-8859-15";
                break;
            case "LATIN9":$out = "ISO-8859-16";
                break;
            case "LATIN9":$out = "ISO-8859-16";
                break;
            case "ISO-8859-1":
            case "ISO-8859-2":
            case "ISO-8859-3":
            case "ISO-8859-4":
            case "ISO-8859-5":
            case "ISO-8859-6":
            case "ISO-8859-7":
            case "ISO-8859-8":
            case "ISO-8859-8-I":
            case "ISO-8859-9":
            case "ISO-8859-10":
            case "ISO-8859-11":
            case "ISO-8859-12":
            case "ISO-8859-13":
            case "ISO-8859-14":
            case "ISO-8859-15":
            case "ISO-8859-16":$out = $in;
                break;
            case "GB18030":
            case "GB2312":
            case "GBK":
            case "BIG5":$out = strtolower($in);
                break;
            case "WIN1250":$out = "Windows-1250";
                break;
            case "WIN1251":$out = "Windows-1251";
                break;
            case "WIN1252":$out = "Windows-1252";
                break;
            case "WIN1253":$out = "Windows-1253";
                break;
            case "WIN1254":$out = "Windows-1254";
                break;
            case "WIN1255":$out = "Windows-1255";
                break;
            case "WIN1256":$out = "Windows-1256";
                break;
            case "WIN1257":$out = "Windows-1257";
                break;
            case "WIN1258":$out = "Windows-1258";
                break;
            case "TIS620":$out = "tis-620";
                break;
            case "SJIS":$out = "shift-jis";
                break;
            default:$out = false;
        }

        return $out;
    }
static function dbCharsetToPhpCharset($in)
    {
        $out = $in;
        switch ($in) {
            case "None":$out = false;
                break;
            case "UTF8":$out = "UTF-8";
                break;
            case "LATIN1":$out = "ISO-8859-1";
                break;
            case "LATIN2":$out = "ISO-8859-2";
                break;
            case "LATIN3":$out = "ISO-8859-3";
                break;
            case "LATIN4":$out = "ISO-8859-4";
                break;
            case "LATIN4":$out = "ISO-8859-4";
                break;
            case "LATIN5":$out = "ISO-8859-9";
                break;
            case "LATIN6":$out = "ISO-8859-10";
                break;
            case "LATIN7":$out = "ISO-8859-13";
                break;
            case "LATIN8":$out = "ISO-8859-14";
                break;
            case "LATIN9":$out = "ISO-8859-15";
                break;
            case "LATIN9":$out = "ISO-8859-16";
                break;
            case "LATIN9":$out = "ISO-8859-16";
                break;
            case "ISO-8859-1":
            case "ISO-8859-2":
            case "ISO-8859-3":
            case "ISO-8859-4":
            case "ISO-8859-5":
            case "ISO-8859-6":
            case "ISO-8859-7":
            case "ISO-8859-8":
            case "ISO-8859-8-I":
            case "ISO-8859-9":
            case "ISO-8859-10":
            case "ISO-8859-11":
            case "ISO-8859-12":
            case "ISO-8859-13":
            case "ISO-8859-14":
            case "ISO-8859-15":
            case "ISO-8859-16":$out = $in;
                break;
            case "GB18030":
            case "GB2312":
            case "GBK":
            case "BIG5":$out = strtolower($in);
                break;
            case "WIN1250":$out = "Windows-1250";
                break;
            case "WIN1251":$out = "Windows-1251";
                break;
            case "WIN1252":$out = "Windows-1252";
                break;
            case "WIN1253":$out = "Windows-1253";
                break;
            case "WIN1254":$out = "Windows-1254";
                break;
            case "WIN1255":$out = "Windows-1255";
                break;
            case "WIN1256":$out = "Windows-1256";
                break;
            case "WIN1257":$out = "Windows-1257";
                break;
            case "WIN1258":$out = "Windows-1258";
                break;
            case "TIS620":$out = "tis-620";
                break;
            case "SJIS":$out = "shift-jis";
                break;
            default:$out = false;
        }

        return $out;
    }
static function dbCharsetToPhpCharset ( $ in ) { $ out = $ in ; switch ( $ in ) { case "None" : $ out = false ; break ; case "UTF8" : $ out = "UTF-8" ; break ; case "LATIN1" : $ out = "ISO-8859-1" ; break ; case "LATIN2" : $ out = "ISO-8859-2" ; break ; case "LATIN3" : $ out = "ISO-8859-3" ; break ; case "LATIN4" : $ out = "ISO-8859-4" ; break ; case "LATIN4" : $ out = "ISO-8859-4" ; break ; case "LATIN5" : $ out = "ISO-8859-9" ; break ; case "LATIN6" : $ out = "ISO-8859-10" ; break ; case "LATIN7" : $ out = "ISO-8859-13" ; break ; case "LATIN8" : $ out = "ISO-8859-14" ; break ; case "LATIN9" : $ out = "ISO-8859-15" ; break ; case "LATIN9" : $ out = "ISO-8859-16" ; break ; case "LATIN9" : $ out = "ISO-8859-16" ; break ; case "ISO-8859-1" : case "ISO-8859-2" : case "ISO-8859-3" : case "ISO-8859-4" : case "ISO-8859-5" : case "ISO-8859-6" : case "ISO-8859-7" : case "ISO-8859-8" : case "ISO-8859-8-I" : case "ISO-8859-9" : case "ISO-8859-10" : case "ISO-8859-11" : case "ISO-8859-12" : case "ISO-8859-13" : case "ISO-8859-14" : case "ISO-8859-15" : case "ISO-8859-16" : $ out = $ in ; break ; case "GB18030" : case "GB2312" : case "GBK" : case "BIG5" : $ out = strtolower ( $ in ) ; break ; case "WIN1250" : $ out = "Windows-1250" ; break ; case "WIN1251" : $ out = "Windows-1251" ; break ; case "WIN1252" : $ out = "Windows-1252" ; break ; case "WIN1253" : $ out = "Windows-1253" ; break ; case "WIN1254" : $ out = "Windows-1254" ; break ; case "WIN1255" : $ out = "Windows-1255" ; break ; case "WIN1256" : $ out = "Windows-1256" ; break ; case "WIN1257" : $ out = "Windows-1257" ; break ; case "WIN1258" : $ out = "Windows-1258" ; break ; case "TIS620" : $ out = "tis-620" ; break ; case "SJIS" : $ out = "shift-jis" ; break ; default : $ out = false ; } return $ out ; }
Takes project config db encoding and converts it to PHP representation for iconv
Takes project config db encoding and converts it to PHP representation for iconv