“GET”方法在PHP中错误地编码法语字符
我有一个网站使用get方法从URL获取参数。 URL有法语字符,它使用get方法字符被破坏。如何使用get方法而不使用法语语言的编码问题?
I have a site that uses get method to get the parameters from URL. The URL has French characters is it and by using get method the characters get ruined. How can I use get method without encoding problems from French language?
这些字符是这样写的URL: http://domain.com/wt.php?id=Thor-: -Le-Monde-des-t%C3%A9n%C3%A8bres
The characters are written in URL this way: "http://domain.com/wt.php?id=Thor-:-Le-Monde-des-t%C3%A9n%C3%A8bres"
然后浏览器网址栏正确编码,但get方法不。
Then The browser URL bar encodes them correctly but the get method does not. The page itself is using "iso-8859-1" encoding.
也许使用没有BOM编码的UTF-8?
Maybe use UTF-8 without BOM encoding?
header('Content-type: text/html; charset=utf-8');
...在PHP和:
<meta charset="utf-8">
...在HTML中。
... in HTML.