You are here: PSPad forum > English discussion forum > Replacing high-ascii characters with low-ascii equivalents weekly

Replacing high-ascii characters with low-ascii equivalents weekly

#1 Replacing high-ascii characters with low-ascii equivalents weekly

Posted by: therium | Date: 2021-04-30 12:52 | IP: IP Logged

Hi,
I have PSPad 5.0.6 64bit on Windows 10.

I edit the same .md file over and over many times over many years. What happens is I copy and paste some data from a web page, and in the .md file I end up with fancy double quotes (left and right quotes are different high-ascii characters) and fancy apostrophes (which is also high ascii). Once a week I'd like to run a program on my .md file to replace all fancy double quotes with a normal low ascii double quote (") and replace all fancy apostrophes with a low ascii apostrophe ('). I'd also like to remove some other non-printing or other high-ascii characters in this weekly process.

I want to automate this process, not use the Search and Replace menu, because there are several replacements I need to do on a weekly basis.

The reason: These characters sometimes do not translate properly when the .md file is converted to an EPUB file (which uses XHTML internally).

- How do I do this in PSPad?
- Is there a way to run a program from a DOS window command line on the text in the current PSPad window?

Thank you!

Edited 1 time(s). Last edit at 2021-04-30 12:54 by therium.

Options: Reply | Quote | Up ^


#2 Re: Replacing high-ascii characters with low-ascii equivalents weekly

Posted by: pspad | Date: 2021-04-30 13:15 | IP: IP Logged

Hello

You can replace all "high" chars with basic chars using e.g. converting code page. Try in the menu Edit / Special conversion / Remove accented chars

If you want to replace special set of chars only, you can create user convertor.
There are possibility to replace strings or chars or... More information in help, you can start from the .\Convertor\Templace.in_
Copy Template.in_ to e.g. MyReplaceChars.ini and modify content. I guess you will be able to understand from the file content.

User convertors are in the Tool menu

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2021 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR