Subject: [netatalk-admins] Anomoly in nbplkup

From: Robert Edwards <[email-masked]>
Date: Thu, 16 Apr 1998 12:51:22 +1000

I first noticed a slight anomoly (sp?) in netatalk-1.3.3 which I reported
back to the folk at U. Mich but it remained in netatalk-1.4b2 and I have
just downloaded Adrian Sun's patched code from U. Washington and found the
same "bug".

The problem is in the asciize() routine that uses the standard C functions
isascii() and toascii() to convert non 7-bit extended Macintosh characters
to 7-bit characters by zeroing the 8th bit before printing them on a Unix
device.

I have an Asante Ether*Print box on my network (the '*' in the middle of
the name is actually a big dot on a Macintosh). I can't recall the actual
8-bit code that renders this dot on a Mac, but when it is toascii()'d, it
turns into some obnoxious control character that stuffs up the character
mapping on the console driver on a Linux box (at least, at version 2.0.27).

I replaced the code in the asciize() routine with code that renders an '*'
if the 8-bit - 7-bit conversion yields a non-printing character (hence my
Asante box now appears as an Ether*Print).

If this problem has affected anyone else, my solution is to modify asciize():
	if ( !isascii( *p )) {
	    *p = toascii( *p );
	    if ( !isprint( *p ))
		*p = '*';
	}

Cheers,

Bob Edwards,

Computer and Robotics Engineer,       e-mail: [email-masked]
Department of Engineering,            phone:  (+61) 2 6249 4090
Australian National University,       fax:    (+61) 2 6249 0506
Canberra, AUSTRALIA, 0200             mobile: (+61) 0416 166 761
      WWW: http://spigot.anu.edu.au/people/bob/home.html

---

From: Alistair Riddell <[email-masked]>
Date: Thu, 16 Apr 1998 12:12:26 +0100 (BST)

On Thu, 16 Apr 1998, Robert Edwards wrote:
[snip]
> If this problem has affected anyone else, my solution is to modify asciize():

It might be a better idea to use something other than a * since this has
special meaning on both the Unix and Mac side. At the very least there is
potential for confusion. Perhaps a _ (underscore) would be a better
choice?

-- 
Alistair Riddell - BOFH
IT Support Department, George Watson's College, Edinburgh
Tel: +44 131 447 7931 Ext 176       Fax: +44 131 452 8594
Microsoft - because god hates us