ASCII code of Chinese characters question. A code you see on the Web
PHP Code
"Echo" ASC: "$ASC;? >
Save with UTF8 save,
Question 1 does not understand haha is UTF8 code?? Why the function can be said to be ASCII to 16 binary. The result is \xe5\x93\x88\xe5\x93\x88.
I checked, haha. The ASCII code of the 16 binary representation is 54c8 54c8, obviously not the same
I don't understand.
------Solution--------------------
It's obviously inappropriate to use "ASCII" here, "turn 16," so that's not appropriate,
The function is actually: the encoding of the string is expressed in the form of 16 binary
So your questions make sense.
Write "non-profit organization or individual, please feel free to reprint, commercial use please with the author's consent" is also very funny,
Because such simple code is not original, others do not need to read and can write the same code,
So, of course, there's no need to "ask for consent."
discuss
PHP Code
/**
*
* ASCII to 16 binary and hex to ASCII
* For non-profit organizations or individuals, please feel free to reprint, commercial use with the consent of the author
*
*/
ASCII to Hex
function Asc2hex ($STR) {
Return ' \x '. substr (Chunk_split (Bin2Hex ($STR), 2, ' \x '), 0,-2);
}
Hex Turn A ...