user4182981
user4182981

Reputation:

Does Notepad convert an ANSI file to Unicode before displaying it?

If the Notepad Edit control is Unicode, so when loading an ANSI file does Notepad first convert its contents to Unicode and then displays it, or does Notepad have two memory buffers (one for ANSI and one for Unicode)?

Upvotes: 1

Views: 350

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 596477

Yes, Notepad does a conversion, which is evident by the fact that it calls IsTextUnicode() to discover the text's encoding when no BOM is present, and thus suffers from the infamous Bush hid the facts bug, which is discussed on Raymond Chen's blog:

Some files come up strange in Notepad

The Notepad file encoding problem, redux

Upvotes: 3

Related Questions