Created
February 5, 2011 21:39
-
-
Save handlename/812818 to your computer and use it in GitHub Desktop.
replace katakana characters with hankaku katakana characters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ktai-hankaku-katakana-region (start end) | |
(interactive "r") | |
(while (string-match | |
"[0-9A-Za-zァ-ンー:;$]+\\|[!?][!?]+" | |
(buffer-substring start end)) | |
(save-excursion | |
(japanese-hankaku-region | |
(+ start (match-beginning 0)) | |
(+ start (match-end 0)) | |
)))) | |
(defun ktai-hankaku-katakana-buffer () | |
(interactive) | |
(ktai-hankaku-katakana-region (point-min) (point-max))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment