3

I'm trying to copy a directory of Korean and Japanese music on a Debian Jessie box. The source file system is HFS+J (Mavericks vintage) from a dead Mac, mounted with hfstools:

# mount -t hfsplus -o ro /dev/sdX /mnt

Japanese (hiragana, katakana and kanji) and Chinese (simplified and traditional) work fine.

If I try listing with Korean (ls /mnt/music), it shows this error but then shows the file:

ls: cannot access ‘/mnt/music/Haha(하하)’: No such file or directory
Haha(하하)

If I try copying with cp, or using rsync, I get:

file has vanished: "/mnt/music/Haha(하하)"

My locale shows UTF8:

LANG=en_AU.UTF-8

Is there a trick to getting files with hangul copying?

3
  • Interesting. Is the ls error message you show from ls /mnt/music? If there are options to mount HFS+ with different handlings of case (HFS is sometimes case-preserving, I think), I would experiment with those. What happens if you switch your locale to C?
    – dhag
    Commented May 4, 2015 at 19:29
  • Correct. I think you're right re: case-preserving, but man mount doesn't list any related options under hfs. I'll try setting my locale to C and report back, thanks. Commented May 7, 2015 at 5:15
  • Setting my locale to C (LANG=C and LC_ALL=C) has the same issue. The plot thickens. Commented May 7, 2015 at 23:48

1 Answer 1

0

It looks like this is an incompatibility between HFS+ and linux as far as how the filesystems handle these special characters. Some more details here:

"Re: File name encoding bug on HFS+ filesystem on Linux?? The problem is still here, and very frustrating. This seems to be an issue with any Linux distribution and Mac OS X. Any file created with Korean characters in its name in either Linux or Mac OS X on an HFS+ partition is unreadable by the other."

http://ubuntuforums.org/showthread.php?t=1422374

At this point, the only solution seems to be renaming the files/folders on HFS+ and then copy. If you don't need the files natively and if it's just for backup, you could place them in a folder and zip them up for storage.

2
  • Please consider inlining the most relevant information from a link in your post rather than just placing a link here (avoids link-rot and simplifies life for those seeking an answer).
    – HalosGhost
    Commented Jun 8, 2016 at 3:21
  • Thanks, yeah looks like Korean Mac/Linux users will be sticking with tar'ing all the things before copying (or renaming on the original machine) for the time being. Since posting this Q, I use a remote ZFS samba store for these files, thereby sidestepping the issue. Hopefully the underlying issue gets resolved, but its thorny. Commented Jun 10, 2016 at 2:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .