Subject: [netatalk-admins] ISO filenames patch, netatalk<->samba<->unix
From: Palle Girgensohn (girgen@partitur.se)
Date: Wed Jan 07 1998 - 16:39:42 EST
Hello!
I have put together a patch that will use ISO-latin to name files stored
on a netatalk server. If this interest you, please feel free to try them
(consider it alpha quality though; of course I take no responsibility
;-) Do not be too alarmed; they work fine for me, with the catch
described below.
I know this is not the only patch around for this, but I couldn't wait
:)
(I'm still interested in getting the patch from Julian, but there's no
rush).
To patch, cd into the netatalk-1.4b2 directory and do 'patch <
xxx/patch.iso' and 'patch < xxx/patch.makefile' (or change the Makefile
in etc/aftpd and add ISO_FILENAMES to the CFLAGS). Then cd into etc/afpd
and do make clean,
cd ../.. and do make; make install and restart afpd. (on some systems,
you might need to reboot... odd, but this is not because of the
patch...)
Now, file names with MacRoman characters that exist in the
ISO-Latin(8859-1) character set are translated into ISO-Latin. This
helps you if you wan't to share files with Unix or Windows (eg via
Samba). For samba, use
'character set = iso8859-1' in smb.conf.
The caveat:
MacRoman has a larger set of characters than iso-8859-1. ASCII defines
only seven bits of a byte, in the interval between 0 and 0x7f. The
interval just after ASCII ends, 0x80 and 0x9f, is used for control chars
by 8859-1 (mirroring the first 32 ASCII chars, sort of?). MacRoman
starts right away defining characters. So I use that interval to map
MacRoman unique chars into iso, so the mac will get them. That is,
MacRoman unique chars are represented in the range 0x80 to 0x9f in
iso-latin. That way, netatalk maintains a one to relation when
converting mac filenames back and forth to the server.
Samba doesn't like the chars in this range and hides the files from the
Windows user. Originally, netatalk converts chars above 0x7f to ':xx'.
This colon is not liked by samba either. The chars not available in iso
are usually stuff like (tm) and the like, which is mostly used for Mac
binaries. These files, you really not need to see in samba. All letters
with umlauts and stuff are available in both charsets...
I feel that files with these names probably only are important to mac
users. Am I right? Maybe using the original colon idea for these are the
best approach; this way samba will see them but the filename is chopped
at the first colon and can not be opened. Other characters than colon
would create even bigger problems, because colon is the only filename
character that is forbidden in both Windows and Mac.
Please give me feedback on this. Also, your own patches for this
functionality interest me :)
Regards,
Palle Girgensohn
Partitur Informationsteknik AB
http://www.partitur.se/
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:30:15 EST