Is it possible to select Hiragana→Katakana conversion and Katakana→Hiragana conversion in EmEditor Professional?

Asked 2 years ago, Updated 2 years ago, 320 views

Thank you for your help.

Case Study
"Einstein" → "Inshutain."

I think this is a function that I often use, so maybe it's a macro, but I think it's a function that lists the conversion of selection as well as full-width and half-width conversion, but I couldn't find it.

Thank you for your cooperation.

emeditor

2022-09-30 21:56

1 Answers

To convert hiragana to katakana, see Convert selected hiragana to katakana.

Conversely, to convert from katakana to hiragana, do the following:

Open the file in EmEditor and press Ctrl+H to open the Replace dialog box.And

Strings to search for:[\x{30A1}-\x{30F6}]
Replaced string:\J String.fromCharCode("\0".charCodeAt(0)-0x60)

Type , select Regular Expressions , and click the Replace All button.

EmEditor Replacement

If you want to do the above in one operation, you can also do the following macros:

 document.selection.Replace("[\\x{30A1}-\\x{30F6}]", "\\J String.fromCharCode(\x22\\0\x22.charCodeAt(0)-0x60), eFindReplaceCase|eeReplaceAll|eeFindReplaceRegExp|eFindReplaceReplaceReplaceReplaceReplaceExp|eFeFeFindReplaceReplace;0;eFindReplace0;ReplaceSply)

Here's how to run the macro:

Save the above macro with the appropriate filename, for example, KataToHira.jsee.
From the EmEditor Macros menu, select the saved macro from Select .
Open the text file that you want to edit, and it is active, and click Run on the Macros menu. Select (or Ctrl+Shift+P).The macro is then executed.


2022-09-30 21:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.