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"));
The same string displays different codes when detecting the code. What is the problem?
There will be different encoding schemes for different character sets. The current one is UTF8