Can I use ASCII code to convert Chinese?

I just saw a PHP reversible encryption algorithm on csdn, in which ord (), chr () operation ASCII, is used. Will it be a problem if it is encoded in Chinese, because there is no corresponding ASCII; in Chinese

clipboard.png

clipboard.png

clipboard.png

Php
Feb.28,2021

doesn't matter, essentially any encoded string can be treated as a normal binary (or hexadecimal, if you like) string, byte by byte, regardless of encoding. Regardless of language and coding, a string is actually stored in binary form, and its minimum length unit is bytes. When you encrypt and decrypt, you deal with it as bytes, not as characters.

Menu