D
D
Dmitry Afonchenko2014-01-12 18:05:18
PHP
Dmitry Afonchenko, 2014-01-12 18:05:18

Why do PHP's ord() and chr() functions give strange numbers and characters when they are greater than 128?

The program must return a character by code from the ASKII table, or produce a code from the table by character. Up to 128 everything works fine, but after that it gives out questions instead of symbols and very strange numbers instead of normal ones. I know that the problem is in the encoding, but I do not know how to solve it. Comrades, tell me, maybe there are some functions or plugins for PHP that allow you to get rid of this nonsense? Thanks in advance to everyone who will respond.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-01-12
@Indermove

us1.php.net/manual/en/function.chr.php#55978

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question