convert special characters to english characters

Started by: user5 voices17 posts

hello!

I currently work with turkish text and I need an automatic way to convert all special turkish characters into their corresponding english/latin characters

because I often work with other than english languages that have special characters, I need a way to convert them to their english/latin character analogue

but for now, a solution for turkish?

thanks!
Hi,

I guess it could be done by macro:

- start "record macro",
- replace one special character to the corresponding latin character (replace all)
- stop record
- "edit" the macro recored, copy all code generated by emeditor and paste it else where.
- repeat the procedure above with each special character you want to replace, except append the generated macro code to the first one.
- save the cumulated code to a single macro, put it in toolbar or asign it a short-cut key.

Best regards! :-)
Hi user,

As ToadLoadin mentioned, you can use a macro to do this.

Also, you can use the Batch Replace feature of EmEditor Professional 11 to do this task easily.

http://emeditor.wpengine.com/modules/feature1/rewrite/tc_39.html#batch_replace

Thanks!
thanks, I will try macro, but I am interested in batch replace too

however, is it possible to save a specific batch and run it by clicking a button in the toolbar?
Hi user,

Unfortunately, it is not easy to create a button from a batch you create from the Batch Replace feature. I might think about exporting as a macro from the Batch Replace dialog in future versions. Thanks!
can anyone write a JS script or something that will do these replaces with a click of a button?

i for ı
g for ğ
s for ş
c for ç
u for ü
o for ö

case sensitive, in all document, every instance

thanks!
Hello,

You could actually record a macro while doing the batch replace.

The actual script will look like:

document.selection.Replace("a","b",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceQuiet);
document.selection.Replace("c","d",eeFindNext | eeFindSaveHistory | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceQuiet);
...


Thanks,
it seems to work very well, thanks!

but how do I specify the case-sensitive action?

I guess while recording the macro, if you turned case sensitive on, it will also be recored into the macro code.
Hi all,

1) What command should be used for removing a character?

2) How to replace double (or more) empty lines with a single empty line?

Thank you!
Yutaka,

I have just used this technique to write a snippet/macro that changes curly quotes (single and double), sort and long dashes into their equivalent keyboard characters.

In the past I have had to do this as a series of "Find and Replace" tasks. Now its a simple highlight the text and click on the snippet.

Thank you very much for the tip.

Regards,
Peter :-D
Any help for removing characters using JavaScript?
You can find it here.
Thank you!

Now how is it possible to remove double (or more) empty lines?

Thank you again for any response!
:-) I think it could be done with this macro:

// If nothing selected, select all.
var currentSelection = getSelection();

// A find'n replace using regular expression
// (in selected range only).
currentSelection.Replace("^s*$n", "", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);

// earase search keyword highlighting.
document.HighlightFind = false;


Then, you could use this macro to insert empty lines between each "none-empty" line (forgive my poor english):

// If nothing selected, select all.
var currentSelection = getSelection();

// A find'n replace using regular expression
// (in selected range only).
currentSelection.Replace("n", "nn", eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);

// earase search keyword highlighting.
document.HighlightFind = false;
I just found that both of the two macro above is not perfect due to lack of checking the setting whether "regular expressions can match new line characters" or not...

Peter ,

Wanna to share your code?

17 posts in this topic