[netatalk-admins] Re:Netatalk and control characters


Subject: [netatalk-admins] Re:Netatalk and control characters
From: Jan Dockx (Jan.Dockx@cs.kuleuven.ac.be)
Date: Thu May 07 1998 - 04:48:52 EDT


>BTW there is a very strong case for saying that any shell script which
>deals with files on a filesystem, and which cannot handle names which are
>legal on that filesystem, is broken, notwithstanding the fact that it may
>rarely if ever see such filenames.

Agreed. But there is such a thing as "reality". ;-)

>
>>I still think that control characters should be mapped too. PC Exchange
>>does so, by the way ("icon%0d" via Dave/Samba).
>So change it - you have the source, and it can't be that difficult to
>modify the range of characters which are mapped. In fact, you should change
>it, make it a compile time option, and give the diffs back to the
>community. :-)
>

>From Andras Kadinger:
=====
 Try this; this adds converting char code 13, that is, ^M. Untested, but
very simple and straightforward.

Hope, this helps,

Sincerely,
Andras Kadinger
bandit@freeside.elte.hu

--- etc/afpd/desktop.c.orig Thu May 7 01:13:47 1998
+++ etc/afpd/desktop.c Thu May 7 01:14:43 1998
@@ -532,7 +532,7 @@
     m = mpath;
     u = upath;
     while ( *m != '\0' ) {
- if ( !isascii( *m ) || *m == '/' || ( i == 0 && *m == '.' )) {
+ if ( !isascii( *m ) || *m == '/' || ( i == 0 && *m == '.' ) ||
*m == 13) {
            *u++ = ':';
            *u++ = hexdig[ ( *m & 0xf0 ) >> 4 ];
            *u++ = hexdig[ *m & 0x0f ];
=======

>>And now that we are on the topic, netatalk should "strip" "some"
>extensions
>>before presenting a filename to the Mac (and add them from the
>AppleVolumes
>>files). We would "win" 4 characters for a filename most of the time. "A
>>Document.doc" is fine for the unix side, and needed for samba users, but
>>I'd like to see it as "A Document".
>
>And if you had two files called "A Document" and "A Document.doc" what
>would you like to see ?
>

Same difference with netatalk cutting very long file names to 31 chars.

Jan Dockx - assistent (Jan.Dockx@cs.kuleuven.ac.be)
K.U.Leuven, Department of Computer Science
Celestijnenlaan 200 A 03.28; 3001 Heverlee; Belgium
tel.: ++ 32/16/32 76 56 fax.: ++ 32/16/32 79 96
<http://www.cs.kuleuven.ac.be/~jand/>
+---------------------------------------------------------------+
  "There's some joke making around about some mathematician
   that said that 1000 chimpansees in 1000 years sitting at
   1000 typewriters would eventually write the works of
   Shakespeare. And the snap around the joke is that the Web
   proves this is not so."
                                Kurt Vonnegut about the Internet
                                in "Vonnegut's Timequake; All
                                Things Considered, September 22,
                                1997; National Public Radio"



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:32:39 EST