I want to display the character codes of a string in php. But its output is null Answer You are trying to get all “bytes” of the unicode string. You need to use mb_strlen() to get the real length of the characters. Then, you need to use mb_substr() to get the right character. Output : See also all mb_* functions
Tag: ascii
PHP, convert UTF-8 to ASCII 8-bit
I’m trying to convert a string from UTF-8 to ASCII 8-bit by using the iconv function. The string is meant to be imported into an accounting software (some basic instructions parsed accordingly to SIE standards). What I’m running now: This works for accounting software #1, but software #2 complains about the encoding. Specified encoding by the standard is: IBM PC