C
C
cybernoob2018-01-30 18:39:46
PHP
cybernoob, 2018-01-30 18:39:46

How to find character code in PHP?

I need to get the code of the letter AND
In UTF-16 it will be 041B (u0418) and in UTF-8 it will be 1048 if I am not confusing anything.
What PHP function to use to enter a Russian letter and get a character code in response?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2018-01-30
@cybernoob

print bin2hex("И");
d098

print bin2hex(mb_convert_encoding("И", 'UCS-2', 'UTF-8'));
0418

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question