\dmd\bin\build dmd/tango/example/console/hello.d
When I open this file in wordpad, everything is as you would expect (in English).
But when I open it up in notepad... you're not going to believe this... The whole thing is in Chinese![totally][totally][totally]
摜摭扜湩扜極摬搠摭琯湡潧支慸灭敬振湯潳敬栯汥潬搮
I have a totally English OS install, and have nothing foreign selected in any regional settings etc.
I've retyped this from scratch over again and it does the same thing.
If I add extra characters from wordpad, or change some characters it displays correctly in English.
The file name and extension makes no difference.
Out of interest I used google translator to translate the Chinese back to English and got this:
Brief fling degrees Breast degrees daub 摭 acting very revered King 湡 潧 support 慸 eliminate vibration King Huazhong 汥 潬 determine 潳
Can someone please please let me know if it is just my PC that has lost the plot!
Notepad - WTF!!!
I was just busy making some batch scripts for compiling some D stuff. Actually I've just installed the thing and are trying to compile tango examples. (probably not important)
Anyway one of the bat files I wrote contains exactly the following (48 chars):
This is a "feature" of how notepad determines what language the file is saved in. Try playing around with the encoding option on the save dialog (Someone here will probably be able to give you a proper way to fix it).
There's another example, if you type something like "Bush hid the secrets", it also comes out in Chinese...
EDIT: "bush hid the facts" apparently.
There's another example, if you type something like "Bush hid the secrets", it also comes out in Chinese...
EDIT: "bush hid the facts" apparently.
File->Open, and you'll see the encoding dropdown will switch to (in this case, I'm guessing) Unicode when you select the file. Change this to ANSI before opening it.
Use .cmd rather than .bat.
Saving as Unicode would fix the problem, however cmd.exe seems oblivious to Unicode batch/command scripts and will choke on the file.
Use .cmd rather than .bat.
Saving as Unicode would fix the problem, however cmd.exe seems oblivious to Unicode batch/command scripts and will choke on the file.
Here's another one:
1. Launch notepad
2. Write some text spanning multiple lines (or open an existing document)
3. Hold Right-Control and press Right-Shift (just like any other windows key combo)
4. Text jumps to be right-justified
5. Try adding some more text - non-alpha numerical characters have odd behaviour...
6. Hold Left-Control and press Left-Shift to revert back to left-justified
First time I did this I was selecting whole words using right control and shift characters + left and right cursor keys. Somewhere in there I did a Ctrl-Shift and my text changed to right justified - it took me a while to find out why!
1. Launch notepad
2. Write some text spanning multiple lines (or open an existing document)
3. Hold Right-Control and press Right-Shift (just like any other windows key combo)
4. Text jumps to be right-justified
5. Try adding some more text - non-alpha numerical characters have odd behaviour...
6. Hold Left-Control and press Left-Shift to revert back to left-justified
First time I did this I was selecting whole words using right control and shift characters + left and right cursor keys. Somewhere in there I did a Ctrl-Shift and my text changed to right justified - it took me a while to find out why!
That would be the intended behaviour - right click and tick "Right to left reading order". It appears in most edit controls (eg even in the Run dialog).
Quote:Original post by benryvesYeah that did it, thanks. Perhaps I'll just change the file association to wordpad anyway.
File->Open, and you'll see the encoding dropdown will switch to (in this case, I'm guessing) Unicode when you select the file. Change this to ANSI before opening it.
Use .cmd rather than .bat.
Saving as Unicode would fix the problem, however cmd.exe seems oblivious to Unicode batch/command scripts and will choke on the file.
I can't imagine what kind of bizarre heuristic notepad uses to guess the encoding scheme.
Quote:Original post by iMalcThe Answer and A previous thread
I can't imagine what kind of bizarre heuristic notepad uses to guess the encoding scheme.
I find it strange that sometimes after I type something and press ctrl+s, the cursor will just 2 characters to the left.
Oh, and after that happens, if I don't notices and press delete a bunch of text, the Undo command doesn't work. I actually have to shutdown notepad and restart it while hoping that I didn't let my hand (automatic muscle memory) save after the stuff up.
Oh, and after that happens, if I don't notices and press delete a bunch of text, the Undo command doesn't work. I actually have to shutdown notepad and restart it while hoping that I didn't let my hand (automatic muscle memory) save after the stuff up.
Quote:Original post by EndarIt sometimes also saves the wrapping points as breaks (so you hit save with word wrap enabled, expand the window and the text is still in a block in the top-left corner rather than wrapping to fill).
I find it strange that sometimes after I type something and press ctrl+s, the cursor will just 2 characters to the left.
Oh, and after that happens, if I don't notices and press delete a bunch of text, the Undo command doesn't work. I actually have to shutdown notepad and restart it while hoping that I didn't let my hand (automatic muscle memory) save after the stuff up.
Other wrapping bugs occasionally include the bottom line of text being
drawn twice, like this.
drawn twice, like this.
XP's Notepad is just broken. I've tried a number of different text editors, many of which throw up splash screens, take a minute to load, have menus the length of your arm, break my indentation, and so on and so forth - so I was pleasantly surprised with Programmer's Notepad.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement