codepage/hex faq? was Re: anyone have a script to change : to - in file and dir names?


Subject: codepage/hex faq? was Re: anyone have a script to change : to - in file and dir names?
From: Chris Harwell (charwell@digitalpulp.com)
Date: Wed Jun 13 2001 - 12:23:03 EDT


> Chris wrote regarding 'anyone have a script to change : to - in file and dir names?' on Wed, Jun 13 at 09:59:
> > does anyone have a script which deals correctly with spaces etc in names,
> > works on the linux/unix side and changes colons in file names to a hyphen?
> > pesky things got there before i realized how useful the nohex option is.
hello,

1) i naively wrote the above question, actually asking for a script to
replace colons, what i really wanted was a script to find special
characters that included colons, like :2e, and :aa and replace them with
something else. though, i'm starting to think that's not such a good idea
anyway.

2)is there a FAQ somewhere that points out issues and and answers common
questions about code-pages and hex-codes - and problems encountered when
changing the code-page and nohex type options in
/etc/atalk/AppleVolumes.default?

if there is i'd really like to read it and find out what code-pages and
hex characters do and are - could someone point me in the right direction to find it?

3) here one for that FAQ:
situation:
a) created a netatalk volume without any of the codepage or nohex options
i.e. in /etc/atalk/AppleVolumes.default stuck a line like this and restarted server:
/var/ftp/pub/mp3/collection "mp3 collection" allow:@mp3users,@mp3admin rolist:@mp3users

b) files and directories containing colons showed up on server, these colons in most cases
actually correspond to some special character like TM or space...

c) backed up file system over network through netatalk with above options using retrospect

d) changed options based on some email on netatalk-admins list to exclude hex and specified
a character set
i.e. in /etc/atalk/AppleVolumes.default stuck a line like this and restarted server:
/var/ftp/pub/mp3/collection "mp3 collection" allow:@mp3users,@mp3admin rolist:@mp3users codepage:maccode.iso8859-1 options:nohex

e) tried to back-up files and got lots of directory not found type of errors.
- those files or directories had special characters like :aa in their names

f) further examination showed some directories wouldn't display from a Mac.

Q: how to fix?
A: go back to the default codepage and allow hex codes.
codepage hex
maccode.iso8859-1 no - didn't work
maccode.iso8859-1 yes - didn't work
none yes - worked

I'm assuming if I'd had the character set and nohex specified from the start that i would have had no problems.
Is this correct?

perhaps we could put a note in that AppleVolumes.default file like this:
codepage:filename -> load filename from nls directory.
                        N.B. changing this option may cause files written in the previous character set
                        to not appear on the Mac side and might create directory not found errors.

what items should be taken into account in order to make a list of recommended codepage and hex/nohex options?
1) underlying file system, ext2 ....
2) native language
3) other ways file system may be written to a) samba b) ftp c) scp

thanks,

-- 
chris
charwell@digitalpulp.com



This archive was generated by hypermail 2b28 : Sun Oct 14 2001 - 03:04:42 EDT