Difference between Big Endian and little Endian Byte order

前端 未结 6 415
情歌与酒
情歌与酒 2020-11-27 10:33

What is the difference between Big Endian and Little Endian Byte order ?

Both of these seem to be related to Unicode and UTF16. Where exactly do we use this?

6条回答
  •  温柔的废话
    2020-11-27 11:00

    UTF-16 encodes Unicode into 16-bit values. Most modern filesystems operate on 8-bit bytes. So, to save a UTF-16 encoded file to disk, for example, you have to decide which part of the 16-bit value goes in the first byte, and which goes into the second byte.

    Wikipedia has a more complete explanation.

提交回复
热议问题