当前位置: 首页>>代码示例>>PHP>>正文


PHP sq_is8bit函数代码示例

本文整理汇总了PHP中sq_is8bit函数的典型用法代码示例。如果您正苦于以下问题:PHP sq_is8bit函数的具体用法?PHP sq_is8bit怎么用?PHP sq_is8bit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sq_is8bit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: charset_decode_utf_8

/**
 * Decode utf-8 strings
 * @param string $string Encoded string
 * @return string Decoded string
 */
function charset_decode_utf_8($string)
{
    global $squirrelmail_language;
    // Japanese translation uses mbstring function to read utf-8
    if ($squirrelmail_language == 'ja_JP') {
        return $string;
    }
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'utf-8')) {
        return $string;
    }
    // decode six byte unicode characters
    /* (i think currently there is no such symbol)
       $string = preg_replace("/([\374-\375])([\200-\277])([\200-\277])([\200-\277])([\200-\277])([\200-\277])/e",
       "'&#'.((ord('\\1')-252)*1073741824+(ord('\\2')-200)*16777216+(ord('\\3')-200)*262144+(ord('\\4')-128)*4096+(ord('\\5')-128)*64+(ord('\\6')-128)).';'",
       $string);
       */
    // decode five byte unicode characters
    /* (i think currently there is no such symbol)
       $string = preg_replace("/([\370-\373])([\200-\277])([\200-\277])([\200-\277])([\200-\277])/e",
       "'&#'.((ord('\\1')-248)*16777216+(ord('\\2')-200)*262144+(ord('\\3')-128)*4096+(ord('\\4')-128)*64+(ord('\\5')-128)).';'",
       $string);
       */
    // decode four byte unicode characters
    $string = preg_replace("/([ð-÷])([€-¿])([€-¿])([€-¿])/e", "'&#'.((ord('\\1')-240)*262144+(ord('\\2')-128)*4096+(ord('\\3')-128)*64+(ord('\\4')-128)).';'", $string);
    // decode three byte unicode characters
    $string = preg_replace("/([à-ï])([€-¿])([€-¿])/e", "'&#'.((ord('\\1')-224)*4096+(ord('\\2')-128)*64+(ord('\\3')-128)).';'", $string);
    // decode two byte unicode characters
    $string = preg_replace("/([À-ß])([€-¿])/e", "'&#'.((ord('\\1')-192)*64+(ord('\\2')-128)).';'", $string);
    // remove broken unicode
    $string = preg_replace("/[€-Ÿ]| |[¡-ÿ]/", '?', $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:38,代码来源:utf_8.php

示例2: charset_decode_gb18030

/**
 * Decode gb18030 encoded string
 * @param string $string gb18030 string
 * @param boolean $save_html don't html encode special characters if true
 * @return string $string decoded string
 */
function charset_decode_gb18030($string, $save_html = false)
{
    // global $aggressive_decoding;
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'gb18030')) {
        return $string;
    }
    // this is CPU intensive task. Use recode functions if they are available.
    if (function_exists('recode_string')) {
        // if string is already sanitized, undo htmlspecial chars
        if (!$save_html) {
            $string = str_replace(array('&quot;', '&lt;', '&gt;', '&amp;'), array('"', '<', '>', '&'), $string);
        }
        $string = recode_string("gb18030..html", $string);
        // if string sanitizing is not needed, undo htmlspecialchars applied by recode.
        if ($save_html) {
            $string = str_replace(array('&quot;', '&lt;', '&gt;', '&amp;'), array('"', '<', '>', '&'), $string);
        }
        return $string;
    }
    /*
     * iconv does not support html target, but internal utf-8 decoding is faster 
     * than pure php implementation. 
     */
    if (function_exists('iconv') && file_exists(SM_PATH . 'functions/decode/utf_8.php')) {
        include_once SM_PATH . 'functions/decode/utf_8.php';
        $string = iconv('gb18030', 'utf-8', $string);
        return charset_decode_utf_8($string);
    }
    // mbstring does not support gb18030
    // pure php decoding is not implemented.
    return $string;
}
开发者ID:teammember8,项目名称:roundcube,代码行数:39,代码来源:gb18030.php

示例3: charset_decode_euc_kr

/**
 * Decode euc-kr encoded string
 * @param string $string euc-kr string
 * @param boolean $save_html don't html encode special characters if true
 * @return string $string decoded string
 */
function charset_decode_euc_kr($string, $save_html = false)
{
    // global $aggressive_decoding;
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'euc-kr')) {
        return $string;
    }
    // this is CPU intensive task. Use recode functions if they are available.
    if (function_exists('recode_string')) {
        // if string is already sanitized, undo htmlspecial chars
        if (!$save_html) {
            $string = str_replace(array('&quot;', '&lt;', '&gt;', '&amp;'), array('"', '<', '>', '&'), $string);
        }
        $string = recode_string("euc-kr..html", $string);
        // if string sanitizing is not needed, undo htmlspecialchars applied by recode.
        if ($save_html) {
            $string = str_replace(array('&quot;', '&lt;', '&gt;', '&amp;'), array('"', '<', '>', '&'), $string);
        }
        return $string;
    }
    /*
     * iconv does not support html target, but internal utf-8 decoding is faster 
     * than pure php implementation. 
     */
    if (function_exists('iconv') && file_exists(SM_PATH . 'functions/decode/utf_8.php')) {
        include_once SM_PATH . 'functions/decode/utf_8.php';
        $string = iconv('euc-kr', 'utf-8', $string);
        return charset_decode_utf_8($string);
    }
    // try mbstring
    if (function_exists('mb_convert_encoding') && function_exists('sq_mb_list_encodings') && check_php_version(4, 3, 0) && in_array('euc-kr', sq_mb_list_encodings())) {
        return mb_convert_encoding($string, 'HTML-ENTITIES', 'EUC-KR');
    }
    return $string;
}
开发者ID:teammember8,项目名称:roundcube,代码行数:41,代码来源:euc_kr.php

示例4: charset_decode_iso_8859_7

/**
 * Decode iso8859-7 encoded strings
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_iso_8859_7($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'iso-8859-7')) {
        return $string;
    }
    $iso8859_7 = array(" " => '&#160;', "¡" => '&#8216;', "¢" => '&#8217;', "£" => '&#163;', "¦" => '&#166;', "§" => '&#167;', "¨" => '&#168;', "©" => '&#169;', "«" => '&#171;', "¬" => '&#172;', "­" => '&#173;', "¯" => '&#8213;', "°" => '&#176;', "±" => '&#177;', "²" => '&#178;', "³" => '&#179;', "´" => '&#900;', "µ" => '&#901;', "¶" => '&#902;', "·" => '&#183;', "¸" => '&#904;', "¹" => '&#905;', "º" => '&#906;', "»" => '&#187;', "¼" => '&#908;', "½" => '&#189;', "¾" => '&#910;', "¿" => '&#911;', "À" => '&#912;', "Á" => '&#913;', "Â" => '&#914;', "Ã" => '&#915;', "Ä" => '&#916;', "Å" => '&#917;', "Æ" => '&#918;', "Ç" => '&#919;', "È" => '&#920;', "É" => '&#921;', "Ê" => '&#922;', "Ë" => '&#923;', "Ì" => '&#924;', "Í" => '&#925;', "Î" => '&#926;', "Ï" => '&#927;', "Ð" => '&#928;', "Ñ" => '&#929;', "Ó" => '&#931;', "Ô" => '&#932;', "Õ" => '&#933;', "Ö" => '&#934;', "×" => '&#935;', "Ø" => '&#936;', "Ù" => '&#937;', "Ú" => '&#938;', "Û" => '&#939;', "Ü" => '&#940;', "Ý" => '&#941;', "Þ" => '&#942;', "ß" => '&#943;', "à" => '&#944;', "á" => '&#945;', "â" => '&#946;', "ã" => '&#947;', "ä" => '&#948;', "å" => '&#949;', "æ" => '&#950;', "ç" => '&#951;', "è" => '&#952;', "é" => '&#953;', "ê" => '&#954;', "ë" => '&#955;', "ì" => '&#956;', "í" => '&#957;', "î" => '&#958;', "ï" => '&#959;', "ð" => '&#960;', "ñ" => '&#961;', "ò" => '&#962;', "ó" => '&#963;', "ô" => '&#964;', "õ" => '&#965;', "ö" => '&#966;', "÷" => '&#967;', "ø" => '&#968;', "ù" => '&#969;', "ú" => '&#970;', "û" => '&#971;', "ü" => '&#972;', "ý" => '&#973;', "þ" => '&#974;');
    $string = str_replace(array_keys($iso8859_7), array_values($iso8859_7), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:iso_8859_7.php

示例5: charset_decode_iso_8859_8

/**
 * Decode iso8859-8 encoded strings
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_iso_8859_8($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'iso-8859-8')) {
        return $string;
    }
    $iso8859_8 = array(" " => '&#160;', "¢" => '&#162;', "£" => '&#163;', "¤" => '&#164;', "¥" => '&#165;', "¦" => '&#166;', "§" => '&#167;', "¨" => '&#168;', "©" => '&#169;', "ª" => '&#215;', "«" => '&#171;', "¬" => '&#172;', "­" => '&#173;', "®" => '&#174;', "¯" => '&#175;', "°" => '&#176;', "±" => '&#177;', "²" => '&#178;', "³" => '&#179;', "´" => '&#180;', "µ" => '&#181;', "¶" => '&#182;', "·" => '&#183;', "¸" => '&#184;', "¹" => '&#185;', "º" => '&#247;', "»" => '&#187;', "¼" => '&#188;', "½" => '&#189;', "¾" => '&#190;', "ß" => '&#8215;', "à" => '&#1488;', "á" => '&#1489;', "â" => '&#1490;', "ã" => '&#1491;', "ä" => '&#1492;', "å" => '&#1493;', "æ" => '&#1494;', "ç" => '&#1495;', "è" => '&#1496;', "é" => '&#1497;', "ê" => '&#1498;', "ë" => '&#1499;', "ì" => '&#1500;', "í" => '&#1501;', "î" => '&#1502;', "ï" => '&#1503;', "ð" => '&#1504;', "ñ" => '&#1505;', "ò" => '&#1506;', "ó" => '&#1507;', "ô" => '&#1508;', "õ" => '&#1509;', "ö" => '&#1510;', "÷" => '&#1511;', "ø" => '&#1512;', "ù" => '&#1513;', "ú" => '&#1514;', "ý" => '&#8206;', "þ" => '&#8207;');
    $string = str_replace(array_keys($iso8859_8), array_values($iso8859_8), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:iso_8859_8.php

示例6: charset_decode_iso_8859_6

/**
 * Decode iso8859-6 strings
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_iso_8859_6($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'iso-8859-6')) {
        return $string;
    }
    $iso8859_6 = array(" " => '&#160;', "¤" => '&#164;', "¬" => '&#1548;', "­" => '&#173;', "»" => '&#1563;', "¿" => '&#1567;', "Á" => '&#1569;', "Â" => '&#1570;', "Ã" => '&#1571;', "Ä" => '&#1572;', "Å" => '&#1573;', "Æ" => '&#1574;', "Ç" => '&#1575;', "È" => '&#1576;', "É" => '&#1577;', "Ê" => '&#1578;', "Ë" => '&#1579;', "Ì" => '&#1580;', "Í" => '&#1581;', "Î" => '&#1582;', "Ï" => '&#1583;', "Ð" => '&#1584;', "Ñ" => '&#1585;', "Ò" => '&#1586;', "Ó" => '&#1587;', "Ô" => '&#1588;', "Õ" => '&#1589;', "Ö" => '&#1590;', "×" => '&#1591;', "Ø" => '&#1592;', "Ù" => '&#1593;', "Ú" => '&#1594;', "à" => '&#1600;', "á" => '&#1601;', "â" => '&#1602;', "ã" => '&#1603;', "ä" => '&#1604;', "å" => '&#1605;', "æ" => '&#1606;', "ç" => '&#1607;', "è" => '&#1608;', "é" => '&#1609;', "ê" => '&#1610;', "ë" => '&#1611;', "ì" => '&#1612;', "í" => '&#1613;', "î" => '&#1614;', "ï" => '&#1615;', "ð" => '&#1616;', "ñ" => '&#1617;', "ò" => '&#1618;');
    $string = str_replace(array_keys($iso8859_6), array_values($iso8859_6), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:iso_8859_6.php

示例7: charset_decode_cp1258

/**
 * Decde a cp1258-encoded string
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_cp1258($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'windows-1258')) {
        return $string;
    }
    $cp1258 = array("�" => '&#8364;', "�" => '&#65533;', "�" => '&#8218;', "�" => '&#402;', "�" => '&#8222;', "�" => '&#8230;', "�" => '&#8224;', "�" => '&#8225;', "�" => '&#710;', "�" => '&#8240;', "�" => '&#65533;', "�" => '&#8249;', "�" => '&#338;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#8216;', "�" => '&#8217;', "�" => '&#8220;', "�" => '&#8221;', "�" => '&#8226;', "�" => '&#8211;', "�" => '&#8212;', "�" => '&#732;', "�" => '&#8482;', "�" => '&#65533;', "�" => '&#8250;', "�" => '&#339;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#376;', "�" => '&#160;', "�" => '&#161;', "�" => '&#162;', "�" => '&#163;', "�" => '&#164;', "�" => '&#165;', "�" => '&#166;', "�" => '&#167;', "�" => '&#168;', "�" => '&#169;', "�" => '&#170;', "�" => '&#171;', "�" => '&#172;', "�" => '&#173;', "�" => '&#174;', "�" => '&#175;', "�" => '&#176;', "�" => '&#177;', "�" => '&#178;', "�" => '&#179;', "�" => '&#180;', "�" => '&#181;', "�" => '&#182;', "�" => '&#183;', "�" => '&#184;', "�" => '&#185;', "�" => '&#186;', "�" => '&#187;', "�" => '&#188;', "�" => '&#189;', "�" => '&#190;', "�" => '&#191;', "�" => '&#192;', "�" => '&#193;', "�" => '&#194;', "�" => '&#258;', "�" => '&#196;', "�" => '&#197;', "�" => '&#198;', "�" => '&#199;', "�" => '&#200;', "�" => '&#201;', "�" => '&#202;', "�" => '&#203;', "�" => '&#768;', "�" => '&#205;', "�" => '&#206;', "�" => '&#207;', "�" => '&#272;', "�" => '&#209;', "�" => '&#777;', "�" => '&#211;', "�" => '&#212;', "�" => '&#416;', "�" => '&#214;', "�" => '&#215;', "�" => '&#216;', "�" => '&#217;', "�" => '&#218;', "�" => '&#219;', "�" => '&#220;', "�" => '&#431;', "�" => '&#771;', "�" => '&#223;', "�" => '&#224;', "�" => '&#225;', "�" => '&#226;', "�" => '&#259;', "�" => '&#228;', "�" => '&#229;', "�" => '&#230;', "�" => '&#231;', "�" => '&#232;', "�" => '&#233;', "�" => '&#234;', "�" => '&#235;', "�" => '&#769;', "�" => '&#237;', "�" => '&#238;', "�" => '&#239;', "�" => '&#273;', "�" => '&#241;', "�" => '&#803;', "�" => '&#243;', "�" => '&#244;', "�" => '&#417;', "�" => '&#246;', "�" => '&#247;', "�" => '&#248;', "�" => '&#249;', "�" => '&#250;', "�" => '&#251;', "�" => '&#252;', "�" => '&#432;', "�" => '&#8363;', "�" => '&#255;');
    $string = str_replace(array_keys($cp1258), array_values($cp1258), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:cp1258.php

示例8: charset_decode_cp1251

/**
 * Decode cp1251-encoded string
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_cp1251($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'windows-1251')) {
        return $string;
    }
    $cp1251 = array("�" => '&#1026;', "�" => '&#1027;', "�" => '&#8218;', "�" => '&#1107;', "�" => '&#8222;', "�" => '&#8230;', "�" => '&#8224;', "�" => '&#8225;', "�" => '&#8364;', "�" => '&#8240;', "�" => '&#1033;', "�" => '&#8249;', "�" => '&#1034;', "�" => '&#1036;', "�" => '&#1035;', "�" => '&#1039;', "�" => '&#1106;', "�" => '&#8216;', "�" => '&#8217;', "�" => '&#8220;', "�" => '&#8221;', "�" => '&#8226;', "�" => '&#8211;', "�" => '&#8212;', "�" => '&#65533;', "�" => '&#8482;', "�" => '&#1113;', "�" => '&#8250;', "�" => '&#1114;', "�" => '&#1116;', "�" => '&#1115;', "�" => '&#1119;', "�" => '&#160;', "�" => '&#1038;', "�" => '&#1118;', "�" => '&#1032;', "�" => '&#164;', "�" => '&#1168;', "�" => '&#166;', "�" => '&#167;', "�" => '&#1025;', "�" => '&#169;', "�" => '&#1028;', "�" => '&#171;', "�" => '&#172;', "�" => '&#173;', "�" => '&#174;', "�" => '&#1031;', "�" => '&#176;', "�" => '&#177;', "�" => '&#1030;', "�" => '&#1110;', "�" => '&#1169;', "�" => '&#181;', "�" => '&#182;', "�" => '&#183;', "�" => '&#1105;', "�" => '&#8470;', "�" => '&#1108;', "�" => '&#187;', "�" => '&#1112;', "�" => '&#1029;', "�" => '&#1109;', "�" => '&#1111;', "�" => '&#1040;', "�" => '&#1041;', "�" => '&#1042;', "�" => '&#1043;', "�" => '&#1044;', "�" => '&#1045;', "�" => '&#1046;', "�" => '&#1047;', "�" => '&#1048;', "�" => '&#1049;', "�" => '&#1050;', "�" => '&#1051;', "�" => '&#1052;', "�" => '&#1053;', "�" => '&#1054;', "�" => '&#1055;', "�" => '&#1056;', "�" => '&#1057;', "�" => '&#1058;', "�" => '&#1059;', "�" => '&#1060;', "�" => '&#1061;', "�" => '&#1062;', "�" => '&#1063;', "�" => '&#1064;', "�" => '&#1065;', "�" => '&#1066;', "�" => '&#1067;', "�" => '&#1068;', "�" => '&#1069;', "�" => '&#1070;', "�" => '&#1071;', "�" => '&#1072;', "�" => '&#1073;', "�" => '&#1074;', "�" => '&#1075;', "�" => '&#1076;', "�" => '&#1077;', "�" => '&#1078;', "�" => '&#1079;', "�" => '&#1080;', "�" => '&#1081;', "�" => '&#1082;', "�" => '&#1083;', "�" => '&#1084;', "�" => '&#1085;', "�" => '&#1086;', "�" => '&#1087;', "�" => '&#1088;', "�" => '&#1089;', "�" => '&#1090;', "�" => '&#1091;', "�" => '&#1092;', "�" => '&#1093;', "�" => '&#1094;', "�" => '&#1095;', "�" => '&#1096;', "�" => '&#1097;', "�" => '&#1098;', "�" => '&#1099;', "�" => '&#1100;', "�" => '&#1101;', "�" => '&#1102;', "�" => '&#1103;');
    $string = str_replace(array_keys($cp1251), array_values($cp1251), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:cp1251.php

示例9: charset_decode_iso_8859_11

/**
 * Decode iso8859-11 string
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_iso_8859_11($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'iso-8859-11')) {
        return $string;
    }
    $iso8859_11 = array(" " => '&#160;', "¡" => '&#3585;', "¢" => '&#3586;', "£" => '&#3587;', "¤" => '&#3588;', "¥" => '&#3589;', "¦" => '&#3590;', "§" => '&#3591;', "¨" => '&#3592;', "©" => '&#3593;', "ª" => '&#3594;', "«" => '&#3595;', "¬" => '&#3596;', "­" => '&#3597;', "®" => '&#3598;', "¯" => '&#3599;', "°" => '&#3600;', "±" => '&#3601;', "²" => '&#3602;', "³" => '&#3603;', "´" => '&#3604;', "µ" => '&#3605;', "¶" => '&#3606;', "·" => '&#3607;', "¸" => '&#3608;', "¹" => '&#3609;', "º" => '&#3610;', "»" => '&#3611;', "¼" => '&#3612;', "½" => '&#3613;', "¾" => '&#3614;', "¿" => '&#3615;', "À" => '&#3616;', "Á" => '&#3617;', "Â" => '&#3618;', "Ã" => '&#3619;', "Ä" => '&#3620;', "Å" => '&#3621;', "Æ" => '&#3622;', "Ç" => '&#3623;', "È" => '&#3624;', "É" => '&#3625;', "Ê" => '&#3626;', "Ë" => '&#3627;', "Ì" => '&#3628;', "Í" => '&#3629;', "Î" => '&#3630;', "Ï" => '&#3631;', "Ð" => '&#3632;', "Ñ" => '&#3633;', "Ò" => '&#3634;', "Ó" => '&#3635;', "Ô" => '&#3636;', "Õ" => '&#3637;', "Ö" => '&#3638;', "×" => '&#3639;', "Ø" => '&#3640;', "Ù" => '&#3641;', "Ú" => '&#3642;', "ß" => '&#3647;', "à" => '&#3648;', "á" => '&#3649;', "â" => '&#3650;', "ã" => '&#3651;', "ä" => '&#3652;', "å" => '&#3653;', "æ" => '&#3654;', "ç" => '&#3655;', "è" => '&#3656;', "é" => '&#3657;', "ê" => '&#3658;', "ë" => '&#3659;', "ì" => '&#3660;', "í" => '&#3661;', "î" => '&#3662;', "ï" => '&#3663;', "ð" => '&#3664;', "ñ" => '&#3665;', "ò" => '&#3666;', "ó" => '&#3667;', "ô" => '&#3668;', "õ" => '&#3669;', "ö" => '&#3670;', "÷" => '&#3671;', "ø" => '&#3672;', "ù" => '&#3673;', "ú" => '&#3674;', "û" => '&#3675;');
    $string = str_replace(array_keys($iso8859_11), array_values($iso8859_11), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:iso_8859_11.php

示例10: charset_decode_cp1253

/**
 * Decode cp1253-encoded string
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_cp1253($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'windows-1253')) {
        return $string;
    }
    $cp1253 = array("�" => '&#8364;', "�" => '&#65533;', "�" => '&#8218;', "�" => '&#402;', "�" => '&#8222;', "�" => '&#8230;', "�" => '&#8224;', "�" => '&#8225;', "�" => '&#65533;', "�" => '&#8240;', "�" => '&#65533;', "�" => '&#8249;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#8216;', "�" => '&#8217;', "�" => '&#8220;', "�" => '&#8221;', "�" => '&#8226;', "�" => '&#8211;', "�" => '&#8212;', "�" => '&#65533;', "�" => '&#8482;', "�" => '&#65533;', "�" => '&#8250;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#160;', "�" => '&#901;', "�" => '&#902;', "�" => '&#163;', "�" => '&#164;', "�" => '&#165;', "�" => '&#166;', "�" => '&#167;', "�" => '&#168;', "�" => '&#169;', "�" => '&#65533;', "�" => '&#171;', "�" => '&#172;', "�" => '&#173;', "�" => '&#174;', "�" => '&#8213;', "�" => '&#176;', "�" => '&#177;', "�" => '&#178;', "�" => '&#179;', "�" => '&#900;', "�" => '&#181;', "�" => '&#182;', "�" => '&#183;', "�" => '&#904;', "�" => '&#905;', "�" => '&#906;', "�" => '&#187;', "�" => '&#908;', "�" => '&#189;', "�" => '&#910;', "�" => '&#911;', "�" => '&#912;', "�" => '&#913;', "�" => '&#914;', "�" => '&#915;', "�" => '&#916;', "�" => '&#917;', "�" => '&#918;', "�" => '&#919;', "�" => '&#920;', "�" => '&#921;', "�" => '&#922;', "�" => '&#923;', "�" => '&#924;', "�" => '&#925;', "�" => '&#926;', "�" => '&#927;', "�" => '&#928;', "�" => '&#929;', "�" => '&#65533;', "�" => '&#931;', "�" => '&#932;', "�" => '&#933;', "�" => '&#934;', "�" => '&#935;', "�" => '&#936;', "�" => '&#937;', "�" => '&#938;', "�" => '&#939;', "�" => '&#940;', "�" => '&#941;', "�" => '&#942;', "�" => '&#943;', "�" => '&#944;', "�" => '&#945;', "�" => '&#946;', "�" => '&#947;', "�" => '&#948;', "�" => '&#949;', "�" => '&#950;', "�" => '&#951;', "�" => '&#952;', "�" => '&#953;', "�" => '&#954;', "�" => '&#955;', "�" => '&#956;', "�" => '&#957;', "�" => '&#958;', "�" => '&#959;', "�" => '&#960;', "�" => '&#961;', "�" => '&#962;', "�" => '&#963;', "�" => '&#964;', "�" => '&#965;', "�" => '&#966;', "�" => '&#967;', "�" => '&#968;', "�" => '&#969;', "�" => '&#970;', "�" => '&#971;', "�" => '&#972;', "�" => '&#973;', "�" => '&#974;', "�" => '&#65533;');
    $string = str_replace(array_keys($cp1253), array_values($cp1253), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:cp1253.php

示例11: charset_decode_iso_8859_13

/**
 * Decode iso8859-13
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_iso_8859_13($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'iso-8859-13')) {
        return $string;
    }
    $iso8859_13 = array(" " => '&#160;', "¡" => '&#8221;', "¢" => '&#162;', "£" => '&#163;', "¤" => '&#164;', "¥" => '&#8222;', "¦" => '&#166;', "§" => '&#167;', "¨" => '&#216;', "©" => '&#169;', "ª" => '&#342;', "«" => '&#171;', "¬" => '&#172;', "­" => '&#173;', "®" => '&#174;', "¯" => '&#198;', "°" => '&#176;', "±" => '&#177;', "²" => '&#178;', "³" => '&#179;', "´" => '&#8220;', "µ" => '&#181;', "¶" => '&#182;', "·" => '&#183;', "¸" => '&#248;', "¹" => '&#185;', "º" => '&#343;', "»" => '&#187;', "¼" => '&#188;', "½" => '&#189;', "¾" => '&#190;', "¿" => '&#230;', "À" => '&#260;', "Á" => '&#302;', "Â" => '&#256;', "Ã" => '&#262;', "Ä" => '&#196;', "Å" => '&#197;', "Æ" => '&#280;', "Ç" => '&#274;', "È" => '&#268;', "É" => '&#201;', "Ê" => '&#377;', "Ë" => '&#278;', "Ì" => '&#290;', "Í" => '&#310;', "Î" => '&#298;', "Ï" => '&#315;', "Ð" => '&#352;', "Ñ" => '&#323;', "Ò" => '&#325;', "Ó" => '&#211;', "Ô" => '&#332;', "Õ" => '&#213;', "Ö" => '&#214;', "×" => '&#215;', "Ø" => '&#370;', "Ù" => '&#321;', "Ú" => '&#346;', "Û" => '&#362;', "Ü" => '&#220;', "Ý" => '&#379;', "Þ" => '&#381;', "ß" => '&#223;', "à" => '&#261;', "á" => '&#303;', "â" => '&#257;', "ã" => '&#263;', "ä" => '&#228;', "å" => '&#229;', "æ" => '&#281;', "ç" => '&#275;', "è" => '&#269;', "é" => '&#233;', "ê" => '&#378;', "ë" => '&#279;', "ì" => '&#291;', "í" => '&#311;', "î" => '&#299;', "ï" => '&#316;', "ð" => '&#353;', "ñ" => '&#324;', "ò" => '&#326;', "ó" => '&#243;', "ô" => '&#333;', "õ" => '&#245;', "ö" => '&#246;', "÷" => '&#247;', "ø" => '&#371;', "ù" => '&#322;', "ú" => '&#347;', "û" => '&#363;', "ü" => '&#252;', "ý" => '&#380;', "þ" => '&#382;', "ÿ" => '&#8217;');
    $string = str_replace(array_keys($iso8859_13), array_values($iso8859_13), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:iso_8859_13.php

示例12: charset_decode_iso_ir_111

/**
 * Decode iso-ir-111 encoded strings
 * @param string $string Encoded string
 * @return string Decoded string
 */
function charset_decode_iso_ir_111($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'iso-ir-111')) {
        return $string;
    }
    $iso_ir_111 = array(" " => '&#160;', "¡" => '&#1106;', "¢" => '&#1107;', "£" => '&#1105;', "¤" => '&#1108;', "¥" => '&#1109;', "¦" => '&#1110;', "§" => '&#1111;', "¨" => '&#1112;', "©" => '&#1113;', "ª" => '&#1114;', "«" => '&#1115;', "¬" => '&#1116;', "­" => '&#173;', "®" => '&#1118;', "¯" => '&#1119;', "°" => '&#8470;', "±" => '&#1026;', "²" => '&#1027;', "³" => '&#1025;', "´" => '&#1028;', "µ" => '&#1029;', "¶" => '&#1030;', "·" => '&#1031;', "¸" => '&#1032;', "¹" => '&#1033;', "º" => '&#1034;', "»" => '&#1035;', "¼" => '&#1036;', "½" => '&#164;', "¾" => '&#1038;', "¿" => '&#1039;', "À" => '&#1102;', "Á" => '&#1072;', "Â" => '&#1073;', "Ã" => '&#1094;', "Ä" => '&#1076;', "Å" => '&#1077;', "Æ" => '&#1092;', "Ç" => '&#1075;', "È" => '&#1093;', "É" => '&#1080;', "Ê" => '&#1081;', "Ë" => '&#1082;', "Ì" => '&#1083;', "Í" => '&#1084;', "Î" => '&#1085;', "Ï" => '&#1086;', "Ð" => '&#1087;', "Ñ" => '&#1103;', "Ò" => '&#1088;', "Ó" => '&#1089;', "Ô" => '&#1090;', "Õ" => '&#1091;', "Ö" => '&#1078;', "×" => '&#1074;', "Ø" => '&#1100;', "Ù" => '&#1099;', "Ú" => '&#1079;', "Û" => '&#1096;', "Ü" => '&#1101;', "Ý" => '&#1097;', "Þ" => '&#1095;', "ß" => '&#1098;', "à" => '&#1070;', "á" => '&#1040;', "â" => '&#1041;', "ã" => '&#1062;', "ä" => '&#1044;', "å" => '&#1045;', "æ" => '&#1060;', "ç" => '&#1043;', "è" => '&#1061;', "é" => '&#1048;', "ê" => '&#1049;', "ë" => '&#1050;', "ì" => '&#1051;', "í" => '&#1052;', "î" => '&#1053;', "ï" => '&#1054;', "ð" => '&#1055;', "ñ" => '&#1071;', "ò" => '&#1056;', "ó" => '&#1057;', "ô" => '&#1058;', "õ" => '&#1059;', "ö" => '&#1046;', "÷" => '&#1042;', "ø" => '&#1068;', "ù" => '&#1067;', "ú" => '&#1047;', "û" => '&#1064;', "ü" => '&#1069;', "ý" => '&#1065;', "þ" => '&#1063;', "ÿ" => '&#1066;');
    $string = str_replace(array_keys($iso_ir_111), array_values($iso_ir_111), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:iso_ir_111.php

示例13: charset_decode_cp855

/**
 * Decode a cp855-encoded string
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_cp855($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'ibm855')) {
        return $string;
    }
    $cp855 = array("�" => '&#1106;', "�" => '&#1026;', "�" => '&#1107;', "�" => '&#1027;', "�" => '&#1105;', "�" => '&#1025;', "�" => '&#1108;', "�" => '&#1028;', "�" => '&#1109;', "�" => '&#1029;', "�" => '&#1110;', "�" => '&#1030;', "�" => '&#1111;', "�" => '&#1031;', "�" => '&#1112;', "�" => '&#1032;', "�" => '&#1113;', "�" => '&#1033;', "�" => '&#1114;', "�" => '&#1034;', "�" => '&#1115;', "�" => '&#1035;', "�" => '&#1116;', "�" => '&#1036;', "�" => '&#1118;', "�" => '&#1038;', "�" => '&#1119;', "�" => '&#1039;', "�" => '&#1102;', "�" => '&#1070;', "�" => '&#1098;', "�" => '&#1066;', "�" => '&#1072;', "�" => '&#1040;', "�" => '&#1073;', "�" => '&#1041;', "�" => '&#1094;', "�" => '&#1062;', "�" => '&#1076;', "�" => '&#1044;', "�" => '&#1077;', "�" => '&#1045;', "�" => '&#1092;', "�" => '&#1060;', "�" => '&#1075;', "�" => '&#1043;', "�" => '&#171;', "�" => '&#187;', "�" => '&#9617;', "�" => '&#9618;', "�" => '&#9619;', "�" => '&#9474;', "�" => '&#9508;', "�" => '&#1093;', "�" => '&#1061;', "�" => '&#1080;', "�" => '&#1048;', "�" => '&#9571;', "�" => '&#9553;', "�" => '&#9559;', "�" => '&#9565;', "�" => '&#1081;', "�" => '&#1049;', "�" => '&#9488;', "�" => '&#9492;', "�" => '&#9524;', "�" => '&#9516;', "�" => '&#9500;', "�" => '&#9472;', "�" => '&#9532;', "�" => '&#1082;', "�" => '&#1050;', "�" => '&#9562;', "�" => '&#9556;', "�" => '&#9577;', "�" => '&#9574;', "�" => '&#9568;', "�" => '&#9552;', "�" => '&#9580;', "�" => '&#164;', "�" => '&#1083;', "�" => '&#1051;', "�" => '&#1084;', "�" => '&#1052;', "�" => '&#1085;', "�" => '&#1053;', "�" => '&#1086;', "�" => '&#1054;', "�" => '&#1087;', "�" => '&#9496;', "�" => '&#9484;', "�" => '&#9608;', "�" => '&#9604;', "�" => '&#1055;', "�" => '&#1103;', "�" => '&#9600;', "�" => '&#1071;', "�" => '&#1088;', "�" => '&#1056;', "�" => '&#1089;', "�" => '&#1057;', "�" => '&#1090;', "�" => '&#1058;', "�" => '&#1091;', "�" => '&#1059;', "�" => '&#1078;', "�" => '&#1046;', "�" => '&#1074;', "�" => '&#1042;', "�" => '&#1100;', "�" => '&#1068;', "�" => '&#8470;', "�" => '&#173;', "�" => '&#1099;', "�" => '&#1067;', "�" => '&#1079;', "�" => '&#1047;', "�" => '&#1096;', "�" => '&#1064;', "�" => '&#1101;', "�" => '&#1069;', "�" => '&#1097;', "�" => '&#1065;', "�" => '&#1095;', "�" => '&#1063;', "�" => '&#167;', "�" => '&#9632;', "�" => '&#160;');
    $string = str_replace(array_keys($cp855), array_values($cp855), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:cp855.php

示例14: charset_decode_iso_8859_15

/**
 * Decode iso8859-15 encoded string
 * @param string $string Encoded string
 * @return string $string Decoded string
 */
function charset_decode_iso_8859_15($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'iso-8859-15')) {
        return $string;
    }
    $iso8859_15 = array(" " => '&#160;', "¡" => '&#161;', "¢" => '&#162;', "£" => '&#163;', "¤" => '&#8364;', "¥" => '&#165;', "¦" => '&#352;', "§" => '&#167;', "¨" => '&#353;', "©" => '&#169;', "ª" => '&#170;', "«" => '&#171;', "¬" => '&#172;', "­" => '&#173;', "®" => '&#174;', "¯" => '&#175;', "°" => '&#176;', "±" => '&#177;', "²" => '&#178;', "³" => '&#179;', "´" => '&#381;', "µ" => '&#181;', "¶" => '&#182;', "·" => '&#183;', "¸" => '&#382;', "¹" => '&#185;', "º" => '&#186;', "»" => '&#187;', "¼" => '&#338;', "½" => '&#339;', "¾" => '&#376;', "¿" => '&#191;', "À" => '&#192;', "Á" => '&#193;', "Â" => '&#194;', "Ã" => '&#195;', "Ä" => '&#196;', "Å" => '&#197;', "Æ" => '&#198;', "Ç" => '&#199;', "È" => '&#200;', "É" => '&#201;', "Ê" => '&#202;', "Ë" => '&#203;', "Ì" => '&#204;', "Í" => '&#205;', "Î" => '&#206;', "Ï" => '&#207;', "Ð" => '&#208;', "Ñ" => '&#209;', "Ò" => '&#210;', "Ó" => '&#211;', "Ô" => '&#212;', "Õ" => '&#213;', "Ö" => '&#214;', "×" => '&#215;', "Ø" => '&#216;', "Ù" => '&#217;', "Ú" => '&#218;', "Û" => '&#219;', "Ü" => '&#220;', "Ý" => '&#221;', "Þ" => '&#222;', "ß" => '&#223;', "à" => '&#224;', "á" => '&#225;', "â" => '&#226;', "ã" => '&#227;', "ä" => '&#228;', "å" => '&#229;', "æ" => '&#230;', "ç" => '&#231;', "è" => '&#232;', "é" => '&#233;', "ê" => '&#234;', "ë" => '&#235;', "ì" => '&#236;', "í" => '&#237;', "î" => '&#238;', "ï" => '&#239;', "ð" => '&#240;', "ñ" => '&#241;', "ò" => '&#242;', "ó" => '&#243;', "ô" => '&#244;', "õ" => '&#245;', "ö" => '&#246;', "÷" => '&#247;', "ø" => '&#248;', "ù" => '&#249;', "ú" => '&#250;', "û" => '&#251;', "ü" => '&#252;', "ý" => '&#253;', "þ" => '&#254;', "ÿ" => '&#255;');
    $string = str_replace(array_keys($iso8859_15), array_values($iso8859_15), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:iso_8859_15.php

示例15: charset_decode_cp1255

/**
 * Decode cp1255-encoded string
 * @param string $string Encoded string
 * @return string $string decoded string
 */
function charset_decode_cp1255($string)
{
    // don't do decoding when there are no 8bit symbols
    if (!sq_is8bit($string, 'windows-1255')) {
        return $string;
    }
    $cp1255 = array("�" => '&#8364;', "�" => '&#65533;', "�" => '&#8218;', "�" => '&#402;', "�" => '&#8222;', "�" => '&#8230;', "�" => '&#8224;', "�" => '&#8225;', "�" => '&#710;', "�" => '&#8240;', "�" => '&#65533;', "�" => '&#8249;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#8216;', "�" => '&#8217;', "�" => '&#8220;', "�" => '&#8221;', "�" => '&#8226;', "�" => '&#8211;', "�" => '&#8212;', "�" => '&#732;', "�" => '&#8482;', "�" => '&#65533;', "�" => '&#8250;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#160;', "�" => '&#161;', "�" => '&#162;', "�" => '&#163;', "�" => '&#8362;', "�" => '&#165;', "�" => '&#166;', "�" => '&#167;', "�" => '&#168;', "�" => '&#169;', "�" => '&#215;', "�" => '&#171;', "�" => '&#172;', "�" => '&#173;', "�" => '&#174;', "�" => '&#175;', "�" => '&#176;', "�" => '&#177;', "�" => '&#178;', "�" => '&#179;', "�" => '&#180;', "�" => '&#181;', "�" => '&#182;', "�" => '&#183;', "�" => '&#184;', "�" => '&#185;', "�" => '&#247;', "�" => '&#187;', "�" => '&#188;', "�" => '&#189;', "�" => '&#190;', "�" => '&#191;', "�" => '&#1456;', "�" => '&#1457;', "�" => '&#1458;', "�" => '&#1459;', "�" => '&#1460;', "�" => '&#1461;', "�" => '&#1462;', "�" => '&#1463;', "�" => '&#1464;', "�" => '&#1465;', "�" => '&#65533;', "�" => '&#1467;', "�" => '&#1468;', "�" => '&#1469;', "�" => '&#1470;', "�" => '&#1471;', "�" => '&#1472;', "�" => '&#1473;', "�" => '&#1474;', "�" => '&#1475;', "�" => '&#1520;', "�" => '&#1521;', "�" => '&#1522;', "�" => '&#1523;', "�" => '&#1524;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#1488;', "�" => '&#1489;', "�" => '&#1490;', "�" => '&#1491;', "�" => '&#1492;', "�" => '&#1493;', "�" => '&#1494;', "�" => '&#1495;', "�" => '&#1496;', "�" => '&#1497;', "�" => '&#1498;', "�" => '&#1499;', "�" => '&#1500;', "�" => '&#1501;', "�" => '&#1502;', "�" => '&#1503;', "�" => '&#1504;', "�" => '&#1505;', "�" => '&#1506;', "�" => '&#1507;', "�" => '&#1508;', "�" => '&#1509;', "�" => '&#1510;', "�" => '&#1511;', "�" => '&#1512;', "�" => '&#1513;', "�" => '&#1514;', "�" => '&#65533;', "�" => '&#65533;', "�" => '&#8206;', "�" => '&#8207;', "�" => '&#65533;');
    $string = str_replace(array_keys($cp1255), array_values($cp1255), $string);
    return $string;
}
开发者ID:jprice,项目名称:EHCP,代码行数:15,代码来源:cp1255.php


注:本文中的sq_is8bit函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。