根据ISO 8859-1
€符号的小数值为128
我的默认PHP脚本编码是
echo mb_internal_encoding(); //ISO-8859-1
Run Code Online (Sandbox Code Playgroud)
所以现在作为PHP
echo chr(128); //Output exactly what i want '€'
Run Code Online (Sandbox Code Playgroud)
但
echo ord('€'); //opposite it returns 226, it should be 128
Run Code Online (Sandbox Code Playgroud)
为什么会这样?