Hi,
when I hit the keys to enter the Euro Sign (AltGr-E) PNotepad inserts a vertical line instead (HTML: ¬)
This is the only editor/application where I have this problem.
Is that a setup problem (that I can fix) or something else?
Hi,
when I hit the keys to enter the Euro Sign (AltGr-E) PNotepad inserts a vertical line instead (HTML: ¬)
This is the only editor/application where I have this problem.
Is that a setup problem (that I can fix) or something else?
Hmm, good question. I think it's a matter of unicode key character input but I'll need to look into it a bit more. For reference on my keyboard AltGr-E doesn't do it and I have to type Alt-0128. This works in notepad but not in PN. Note that you can copy-paste the character in as a stopgap.
Thanks for the quick answer.
AltGr-E is only valid for the German Keyboard I think.
It's not a big thing - actually it's better to use € in the HTML text anyway, so that forces better HTML coding :)
Seems that unicode input doesn't work in PNotepad which is a pity. I'm using it not only for programming but for writing documents in LaTeX. And sometimes there's a Unicode symbol I need to write like € or others.
Comparing the Unicode numbers for ¬ und €:
¬ = 0x00AC
€ = 0x20AC
So only the least significant byte will be accepted by PNotepad, but it still works with copy/pasting text.
A unicode version is next on the priority list after the release I'm currently working on - I decided that the advanced regex support was the first thing to get right.
you can also use alt-0128 in the meantime, which is at least faster than copying and pasting.
Alt-0128 won't work either because it's the same thing as pressing AltGr+E (on german keyboards). It only works with copy/paste for a Euro sign written somewhere else.
A similar thing happens in UTF-8-files when search/replace with symbols that are not ASCII. I wanted to replace some LaTeX-encodings into unicode letters, e.g. \"u into ü. Won't work. As a result I only get a black square with inside "FC" written which is the ANSI code for ü but not the unicode... so I'm hoping that the "advenced regex support" will also support correct text replacing in unicoded files. :)
If you want to replace special characters in UTF-8 files you would have to replace to 2 characters. Personally I usually use ".." to match a special character.
If you want to get the codes for the replacement - select the character and press CTRL+R - characters that you will see is the code you are looking for (e.g. you will get '??' for 'ü'). Just put it in the 'Replace with' and you should be fine.
My guess is that replace works on bytes rather then characters.
EDIT: Obviously you will not get question marks - this forum is displaying those chars as question marks.
Sorry for the late answer. :(
No, this forum does not per se display question marks. It's a wrong default encoding for this website. If you're using Firefox, select Menu -> View -> Encoding, then choose ISO 8859-15. I know, German umlauts are part of 8859-15, but when I posted it, the webpage was displayed in UTF-8, so it should be working also for sending characters in the same encoding ... Seems a bit tricky here.
Back to topic:
I should have to replace TWO characters? That's ridiculous. A non ascii character is still ONE character. It only needs two bytes to store it, but the editor should abstract from the used encoding and let me replace ONE character. Also it is ONE key that I'm pressing to create the character - you see it makes no sense if the user should use two chars for some cases.
I'm intending to fix this with the move to Unicode in 2.1. The current problems are caused because the UI is running in Windows-1252 (or whatever your default non-unicode locale is) and the edit control is running (probably) in UTF-8. PN is not converting the text between the find page and the edit control, resulting in the replacements not working.
More problematic is that very few regular expressions engines work well with unicode characters requiring multiple code units, meaning support here may always be weak.
Thanks for the explanation. :) (But wasn't it clear that using different encodings internally will lead to problems for almost all non-english countries? *g*)
But in most cases Programmer's Notepad does fine. I'm kind of misusing it as an all-purpose editor, writing German documents, not only programming.
You must log in to post.