header("Content-type:text/html;charset=utf-8"); $secret1 = "rZa9GneIzd9MNyoTv/Ghpk2V6ZHD0KeQC7t0ymEH7cI="; $secret2 = 'rZa9GneIzd9MNyoTv/Ghpk2V6ZHD0KeQC7t0ymEH7cI='; $secret3 = 'rZa9GneIzd9MNyoTv/Ghpk2V6ZHD0KeQC7t0ymEH7cI='; var_dump(trim($secret1)); echo "<br>"; var_dump(trim($secret2)); echo "<br>"; var_dump($secret3); echo "<br>"; echo mb_detect_encoding($secret1, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5")); echo "<br>"; echo mb_detect_encoding($secret2, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5")); echo "<br>"; echo mb_detect_encoding($secret3, array("ASCII", "UTF-8", "GB2312", "GBK", "BIG5"));
Derselbe String zeigt beim Erkennen der Codierung unterschiedliche Codierungen an. Was ist das Problem?
针对不同字符集, 会有不同的编码方案, 现在通用的是UTF8