9fans archive / 1998 / 09 / 42 /    prev next

From: Russ Cox rsc@pla...
Subject: No subject
Date: Tue, 8 Sep 1998 09:44:51 -0400

> For examples,
>   for(l=latin;*l;l++) nutf+=runelen(*l&255);  etc.
>
> Are there any special purpose to use this coding?

Not that I have any real definitive answer, but I can hazard a guess...

A lot of content on the Internet is in Latin1 instead of UTF,
especially at the time mothra was written.

I'm thinking that at the time of the CD distribution (April 1995)
most web servers didn't include character set info in the HTTP
headers, so Latin1 probably seemed like a good default.

You could probably extend the part of mothra that cracks the
headers so that it recognizes the encoding line in the HTTP headers
(Content-Transfer-Encoding: or something similar, I think) and
acts accordingly, probably by pushing it thru tcs.

Russ