Answer the question
In order to leave comments, you need to log in
What is the difference between utf8mb4, UCS-4BE', 'UTF-32' PHP/MySQL?
You need to define the numeric number of the UTF character.
unpack('N', mb_convert_encoding($utf8Character, 'UCS-4BE', 'UTF-8'))[1]; - it all works.
also some suggest converting to 'UTF-32BE' - why?
in MySQL data is stored in utf8mb4. that's 4 bytes per character.
I want to understand why it is necessary to convert to UCS-4BE, if we already have data stored in 4 bytes guaranteed.
If you do not convert, the design does not work - why?
And I didn’t quite understand what is the difference between UCS-4BE and UTF-32?
Answer the question
In order to leave comments, you need to log in
MySQL stores data in utf8mb4 . that's 4 bytes per character
In utf8mb4 encoding, the character length varies from 1 to 4 bytes. In UCS-4 and UTF-32 encodings, the character length is always 4 bytes. How they differ can be found in Wikipedia https://en.wikipedia.org/wiki/UTF-32
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question