trouble mounting local and network filesystems with accented character filenames
Hi folks,
I hope someone can help me with a problem which relates to how filenames with accented characters (i.e. unicode) are treated when mounted from a local ext3 drive or from a network drive.
My situation is this. I have a QNAP TS-109 which is a NAS device running a kind of embedded Debian linux. I ssh into this box in order to do admin on it. Also on my network is another NAS, a Lacie Ethernet Disk mini. I mount this drive on the QNAP using smbmount, without any immediate problems.
The Lacie is supposed to become a backup box for the QNAP. I want to run rsync on the QNAP to sync files with the Lacie. The problem is that I have files created on Windows which have accented characters in the filenames. If I have two identically named files on the QNAP and the Lacie, they actually look different when mounted on the QNAP, presumably because I have not managed to get the mounting correct yet, and they therefore don't rsync correctly. Imagine a file called "täst.txt" (in case that doesn't display as it should on your screen, it should look like "test.txt" except with an accented character instead of "e"). The output of ls on a QNAP directory with this file looks like this "tA☼st.txt" (i.e. two chars are subsituted for the accented one), but the same file in a lacie directory looks like this "t,st.txt".
After some research into what is going on, I reckon that what is happening is that the accented character is stored as a double byte unicode char, and that is why it comes up as two chars when it is on the QNAP's own hard drive. This is a internal ext3 drive, and according to the man page for mount it is not possible to mount ext3 drives with support for unicode in filenames. When mounting samba filesystems, however, unicode can be supported in some way, and the double byte char is correctly interpretted as one char, but it can't be displayed on my terminal.
I don't really care about how these are displayed. All I need is for both filesystems to be mounted in the same way. That would mean that I could rsync all the files correctly - if I try at the moment, then it creates new files even when the same file is present on both systems.
The reason I am stuck is as follows. I don't really understand how the local drive is mounted, because "cat /etc/fstab" doesn't produce any info about /dev/sda3, which is the relevant local ext3 drive partition. Evidently the mount configuration is elsewhere on this version of embedded Debian, but I don't know where to look. My next idea was to try and get smbmount to mount the Lacie drive without unicode support, meaning the accented chars on the Lacie would look wrong in the same way as they look wrong on the local drive. I have tried all kinds of things like "smbmount //EDmini/ED_mini /mnt/lacie/ -o iocharset=iso8859-1", but they don't change the way the filenames appear, and I don't really understand this.
Anyway, I would be very very grateful if anyone could offer any ideas at all which could get me closer to solving this!
Cheers,
Ben
|