Travis B. wrote: ↑Mon Apr 24, 2023 5:49 pm
I thought Windows now uses UTF-16 internally, after a period of using UCS-2
I think 1252 is compatible with UTF-16. But try this: open a command prompt and type Alt-130. You should get é. If you run CHCP it will tell you that you have code page 437 (unless you've changed that in the registry). Heck, typing alt-130 give me é right here.
Or, open Notepad, then type alt-130 to get an é, then save the file. Now open cmd.exe and type your file; it will output some garbage (├⌐). So no, Windows is not internally consistent.
Travis B. wrote: ↑Mon Apr 24, 2023 5:49 pm
I thought Windows now uses UTF-16 internally, after a period of using UCS-2
I think 1252 is compatible with UTF-16. But try this: open a command prompt and type Alt-130. You should get é. If you run CHCP it will tell you that you have code page 437 (unless you've changed that in the registry). Heck, typing alt-130 give me é right here.
Or, open Notepad, then type alt-130 to get an é, then save the file. Now open cmd.exe and type your file; it will output some garbage (├⌐). So no, Windows is not internally consistent.
Apparently Notepad currently has options for "ANSI", UTF-8, and "Unicode"; "Unicode" is UTF-16 little endian. Of course, (almost) no one outside Microsoft actually saves files in UTF-16, even if they use UTF-16 internally (e.g. Java, JavaScript, etc.), and I bet very few people actually use the "Unicode" option in Notepad. In this case, I am pretty sure you probably are saving the file as UTF-8, as any sane person would.