path: root/fs/hfsplus/xattr.c
diff options
authorErnesto A. Fernández <>2018-08-21 21:59:19 -0700
committerLinus Torvalds <>2018-08-22 10:52:50 -0700
commitafd6c9e1f5287ad236adcf56db8c42fef65561fa (patch)
tree873279d1400a511e6c6cb739a39f1b9eeee294a0 /fs/hfsplus/xattr.c
parent31651c607151f1034cfb57e5a78678bea54c362b (diff)
hfsplus: fix decomposition of Hangul characters
Files created under macOS cannot be opened under linux if their names contain Korean characters, and vice versa. The Korean alphabet is special because its normalization is done without a table. The module deals with it correctly when composing, but forgets about it for the decomposition. Fix this using the Hangul decomposition function provided in the Unicode Standard. The code fits a bit awkwardly because it requires a buffer, while all the other normalizations are returned as pointers to the decomposition table. This is actually also a bug because reordering may still be needed, but for now leave it as it is. The patch will cause trouble for Hangul filenames already created by the module in the past. This shouldn't really be concern because its main purpose was always sharing with macOS. If a user actually needs to access such a file the nodecompose mount option should be enough. Link: Signed-off-by: Ernesto A. Fernández <> Reported-by: Ting-Chang Hou <> Tested-by: Ting-Chang Hou <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'fs/hfsplus/xattr.c')
0 files changed, 0 insertions, 0 deletions