Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Emacs: MacでPDFからコピーすると濁点が分離する問題を直す
;; ucs-normalize-NFC-region で濁点分離を直す
;; M-x ucs-normalize-NFC-buffer または "C-x RET u" で、
;; バッファ全体の濁点分離を直します。
;; 参考:
(require 'ucs-normalize)
(prefer-coding-system 'utf-8-hfs)
(setq file-name-coding-system 'utf-8-hfs)
(setq locale-coding-system 'utf-8-hfs)
(defun ucs-normalize-NFC-buffer ()
(ucs-normalize-NFC-region (point-min) (point-max))
(global-set-key (kbd "C-x RET u") 'ucs-normalize-NFC-buffer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment