Programming‎ > ‎Data‎ > ‎Data type‎ > ‎

character encoding

:-)

ASCII
A 7-bit coded character set with 128 characters. When stored in 8 bit the top bit is normally set to 0.

Extended ASCII
Using the top bit in ASCII one get support for 256 characters and a huge number of problems. There are no standard for these extra 128 characters so every one created a separate extension. They are called code pages and each one is assigned a number. In windows one can list the current code page with the command chcp.

Unicode:
If your game need to support any language you can use unicode. It have slots for a million characters or so and they add any new or dead language they find. With that many values there are a number of way of encoding them.

UTF-8
Variable width encoding that is compatible with ASCII. If the high bit is 0 in a byte it's the same as a ascii character. If it is set to 1 more then one byte is needed for this character.

UTF-16

UTF-32
Fixed width encoding where each character is 32 bit.

Reference:

Comments