Skip to content

yorkxin/apfs-docker-unicode-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

APFS Japanese Kana Compatibility PoC

Read more on this detailed post: Accented Latin and Kana File Names Finally Work as Expected in APFS

Problem of Kana File Name

In HFS+, file name will be decomposed to Unicode NFD form. So a file named ありがとう will be decomposed to ありか<U+3099>とう, where U+3099 is a 濁点 sound mark.

When we build an image that is based on Linux, Docker doesn't compose the string back to NFC form, thus any file with 濁点 or 半濁点 will not be accessible.

For example:

$ docker build -t test-image .
$ docker run test-image cat ありがとう.txt
cat: can't open '/ありがとう.txt': No such file or directory

Becuase the file name is in NFD form, it can only be accessed by ありか<U+3099>とう.txt.

APFS has no such problem

In APFS, file names are not decomposed to NFD form, thus there is no such problem.

To try it, first upgrade to macOS 10.12.4+.

Create a disk:

hdiutil create -fs APFS -size 1GB foo.sparseimage

Mount it, and cd to it in the terminal.

Now try again:

$ docker build -t test-image .
$ docker run test-image ありがとう.txt
ありがとう means Thank You!

It works ✨

License

Public Domain

About

APFS & Docker: Accented Latin and Japanese Kana Compatibility PoC

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published