I'm trying to figure out a way to automatically search and replace all special/accented letters/characters (such as Â
/Ô
) with the equivalent regular letters/characters (A
/O
) in Notepad++.
Tried using ToolFx but it didn't work.
find and replacenotepad
I'm trying to figure out a way to automatically search and replace all special/accented letters/characters (such as Â
/Ô
) with the equivalent regular letters/characters (A
/O
) in Notepad++.
Tried using ToolFx but it didn't work.
Best Answer
The suggestion above is excellent, but in this very moment it would not work because of an issue between Notepad++ and "Notepad++ Python Script". Since some months Notepad++ plug in manager downloads an old Python Script version that won't work with the editor. To fix that:
You are almost done. Go to the Plugins => Python Script => Show console menu. A pane shall appear at the bottom of Notepad++. It MUST show a prompt like the following:
The various version numbers are current as of today, of course they shall change as time goes on. If the bottom pane shows an exception stating an exception occurred or (and) it stays blank, then you have installed a wrong Python plug in version.
Now, let's apply the script in the correct way:
from Npp import *
and then press Enter (from now assume you'll always press Enter at the end of the commands).import unicodedata
in the same input text.Enter the following commands, one line at a time, in the Python prompt and then press Enter after each line:
If you want to be sure Python "really got the text in": after you typed
eText = editor.getText()
(+ Enter key), enter:print eText
+ Enter. You should see your accented text dumped in the Python console output pane.editor.addText( nText.encode('ASCII', 'ignore') )
in the usual Python console command input text box.