Subject: [netatalk-admins] translate content of TEXT-files?

From: Tore Halset <[email-masked]>
Date: Tue, 20 Jul 1999 13:40:23 +0200 (MET DST)

In CAP there is a flag (ISO_TRANSLATE) to translate the characters in
text-files. Is this nice thing in Netatalk as well?

This would make life a lot more easy for lots of people. 

Okay, what is the problem? 
Someone create a .html-file on a Netatalk-volume on our webserver with
some norwegian characters (æøåÆØÅ) with BBEdit. Later they want to look at
the webpage with Netscape or IE, but characters have changed

ø to a ¿
å to a ‘ and so on.

This is because the Macintosh does not use ISO-8859-1, but perhaps
Netatalk could help?

Netatalk has a AppleVolumes.system with a table like
.zip    ZIP     ZIP
and converts CR <-> LF on all 'TEXT'-files.

CAP har an afpfile with a table like
.zip Raw 'ZIP ' 'ZIP ' "This is a ZIP-file"

Raw means no translation
Ascii, map LF to CR and vice versa
Iso, map to/from ISO 8859 characters (requires ISO_TRANSLATE)

Does anyone else miss this part in Netatalk?

 - Tore.

---

From: Jim Zajkowski <[email-masked]>
Date: Tue, 20 Jul 1999 08:45:12 -0400 (EDT)

> the webpage with Netscape or IE, but characters have changed

Regardless, this is not the way to make web pages.  If someone in a
different locale opens your file, they, too, will see trash.  

The solution is the proper HTML entities:

  &oslash;
  &aring;

Jim

---

From: Palle Girgensohn <[email-masked]>
Date: Tue, 20 Jul 1999 16:27:38 +0200

Jim Zajkowski wrote:
> > å to a ? and so on.

...or, start the html file with <META HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=iso-8859-1">

This will tell browsers which character set to use. Hence, the posting
is really not incorrect html. You could probably change this into
charset=macroman-something and not do any translation at all, but that
would probably break for some browsers.

I think there might be even more problems with iso translation turned on
in netatalk, but that depends on the knowledge level of the users, I
guess. It's not too hard to implement, I guess, but there are problems
to take into consideration, like what to do with MacRoman characters not
existing in the smaller ISO character set.

The easiest way to get it working is probably to use html-entities, or
maybe use CAP? Also, some mac programs should be able to save files in
iso charset representration, and for bbedit there's a macroman<->iso
translation plugin in the info-mac archive. 

ftp://ftp.sunet.se/pub/mac/info-mac/text/bbe/midex-pack-132.hqx

/Palle