I make a simple PhP program
<?php
echo $_GET['ID'];
?>
Then I call
http://localhost/testGetID/?ID=%E6%AD%A4%E5%8E%9F%E7%90%86%E6%98%AF%E5%9C%A8
This is what I got:
æ¤åŽŸç†æ˜¯åœ¨
What should I do so I show up actual chinese characters? The chinese characters will be ID for my databases by the way.
add this line to your
<head></head>section<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />use
urldecode()ormb_convert_encoding()functionencode the ID with
base64_encode()and then decode it withbase64_decode()