Skip to content

It resolves macOS's hangul encoding discrepancy of NFD from more conventional NFC. That is, known as 한글 파일명 자소 분리 problem.

License

Notifications You must be signed in to change notification settings

HyunggyuJang/migemo-hangul.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Migemo hangul extension

What is migemo?

Please visit https://github.com/emacs-jp/migemo for this.

Why hangul extension?

There has been some problem around macOS with hangul, and Emacs couldn’t escape from this: https://www.reddit.com/r/emacs/comments/fvsijm/question_about_korean_font_display_issue/ There are many solution out there, including above link, however those have some limitation.

  • Even if you solved font rendering issue, you can’t still search through hangul file name using `find-file` in Emacs. Since Emacs by default use NFC characters as does Linux, there’s conflicts between NFC – what queried – and NFD – the actual target.
  • Fortunately, you can solve this problem by normalizing encoding system as suggested from here (in Korean). But this method also isn’t perfect. In a nutshell, what it does is normalize contents with NFC from NFD before read, and when it comes to save, reverts the process: from NFC to NFD then store the data to the disk.

    The use case I felt annoying by sticking with it is Org roam uses NFD system for file name, and for database, so from the Org roam perspective, it sees NFC file name and stores that link and links that link to another file. However, the real file name under the hood saved in NFD encoding; thus backlinks get broken, which the most prominent feature of roam.

    The thing is there might be some other package relying on NFD not NFC, and the difference between read encoding system and saved encoding system will definitely cause some problems near future, which is hard to debug anyway.

So, I’ve gone with amending the search function in Emacs. What I’ve implemented is actually doesn’t require migemo for it to function, but as I also speak Japanese and sometimes I have to write that in Emacs for academic purpose, I chose to extend migemo library.

I might consider detach my library from migemo, so it can be used as a standalone.

About

It resolves macOS's hangul encoding discrepancy of NFD from more conventional NFC. That is, known as 한글 파일명 자소 분리 problem.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published