Easily Translate Special Symbols Into Letters with EmEditor's Text Converter Feature

Easily Translate Special Symbols Into Letters with EmEditor's Text Converter Feature

Kevin Lv8

Easily Translate Special Symbols Into Letters with EmEditor’s Text Converter Feature

Viewing 17 posts - 1 through 17 (of 17 total)

  • Author
    Posts
  • February 3, 2012 at 1:04 pm #9923
    user
    Participant
    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!
    February 3, 2012 at 3:03 pm #9925
    ToadLoadin
    Member
    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! :-)
    February 3, 2012 at 6:57 pm #9933
    Yutaka Emura
    Keymaster
    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://www.emeditor.com/modules/feature1/rewrite/tc_39.html#batch_replace
    Thanks!
    February 3, 2012 at 7:11 pm #9939
    user
    Participant
    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?
    February 3, 2012 at 7:19 pm #9942
    Yutaka Emura
    Keymaster
    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!
    February 7, 2012 at 9:21 am #9968
    user
    Participant
    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!
    February 7, 2012 at 5:08 pm #9973
    Yutaka Emura
    Keymaster
    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,
    February 16, 2012 at 10:50 am #10023
    user
    Participant
    it seems to work very well, thanks!
    but how do I specify the case-sensitive action?
    February 16, 2012 at 11:56 am #10024
    ToadLoadin
    Member
    I guess while recording the macro, if you turned case sensitive on, it will also be recored into the macro code.
    March 1, 2012 at 6:54 pm #10097
    ldm
    Participant
    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!
    March 3, 2012 at 2:18 am #10100
    pja
    Participant
    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
    March 3, 2012 at 9:10 am #10102
    ldm
    Participant
    Any help for removing characters using JavaScript?
    March 3, 2012 at 12:01 pm #10103
    ToadLoadin
    Member
    You can find it here.
    March 3, 2012 at 12:47 pm #10104
    ldm
    Participant
    Thank you!
    Now how is it possible to remove double (or more) empty lines?
    Thank you again for any response!
    March 3, 2012 at 1:57 pm #10105
    ToadLoadin
    Member
    :-) 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;  

March 3, 2012 at 2:16 pm #10106
ToadLoadin
Member
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…

March 3, 2012 at 4:30 pm #10107
ldm
Participant
Peter ,
Wanna to share your code?

  • Author
    Posts

Viewing 17 posts - 1 through 17 (of 17 total)

  • You must be logged in to reply to this topic.

Also read:

https://techidaily.com
  • Title: Easily Translate Special Symbols Into Letters with EmEditor's Text Converter Feature
  • Author: Kevin
  • Created at : 2024-10-12 20:57:50
  • Updated at : 2024-10-13 16:26:33
  • Link: https://win-wonderful.techidaily.com/easily-translate-special-symbols-into-letters-with-emeditors-text-converter-feature/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Easily Translate Special Symbols Into Letters with EmEditor's Text Converter Feature