user4407915
user4407915

Reputation:

Can Notepad read UTF-32?

These bytes represent the word "hi" in UTF-32LE:

FF FE 00 00 68 00 00 00 69 00 00 00

However this is what Notepad displays:

enter image description here

Upvotes: 2

Views: 2033

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 596497

Notepad does not support UTF-32, only ANSI, UTF-8, and UTF-16. It is interpreting the first 2 bytes as a UTF-16LE BOM, not the first 4 bytes as a UTF-32LE BOM, so the file bytes get interpreted as

FF FE 00 00 68 00 00 00 69 00 00 00

Instead of

FF FE 00 00 68 00 00 00 69 00 00 00

Upvotes: 2

Related Questions