Return-Path: majordom@sunlabs 
Return-Path: <majordom@sunlabs>
Received: from sunlabs.eng.sun.com by sage.Eng.Sun.COM (5.x/SMI-SVR4)
	id AA14172; Tue, 4 Jun 1996 08:45:05 -0700
Received: filtered by sunlabs.eng.sun.com (SunLabs-1.2)
	id AA24337; Tue, 4 Jun 1996 08:43:51 -0700
Received: from Eng.Sun.COM (engmail1.Eng.Sun.COM) by sunlabs.eng.sun.com (SunLabs-1.2)
	id AA24331; Tue, 4 Jun 1996 08:43:48 -0700
Received: from mercury.Sun.COM (mercury.EBay.Sun.COM) by Eng.Sun.COM (5.x/SMI-5.3)
	id AA12717; Tue, 4 Jun 1996 08:44:01 -0700
Received: by mercury.Sun.COM (Sun.COM)
	id IAA08441; Tue, 4 Jun 1996 08:43:58 -0700
Received: from linkoping.trab.se (vega.linkoping.trab.se [131.115.46.5]) by malmo.trab.se (8.7.3/TRAB-primary-1) with ESMTP id RAA08135; Tue, 4 Jun 1996 17:43:52 +0200 (MET DST)
Received: from localhost (alfa.linkoping.trab.se [131.115.46.83]) by linkoping.trab.se (8.7.5/TRAB-secondary-1) with ESMTP id RAA28024; Tue, 4 Jun 1996 17:43:49 +0200 (MET DST)
Message-Id: <199606041543.RAA28024@linkoping.trab.se>
X-Mailer: exmh version 1.6.7 5/3/96
To: Hein Meling <hein@hsr.no>
Cc: Nils-Henner Krueger <nhk@WHU-Koblenz.de>, exmh-users@sunlabs.Eng.Sun.COM,
        Ola.S.Stromfors@telia.se
Subject: Re: char's in header lines 
In-Reply-To: Your message of "Sat, 25 May 1996 16:13:11 +0200."
             <199605251413.QAA21523@broremann.hsr.no> 
Mime-Version: 1.0
	boundary="===_0_Tue_Jun__4_17:38:24_MET_DST_1996"
Date: Tue, 04 Jun 1996 17:43:49 +0200
From: Ola Stromfors <Ola.S.Stromfors@telia.se>
Sender: owner-exmh-users@sunlabs.Eng.Sun.COM
Precedence: bulk
Content-Type: multipart/mixed ;
	boundary="===_0_Tue_Jun__4_17:38:24_MET_DST_1996"
Content-Length: 14908

This is a multipart MIME message.

--===_0_Tue_Jun__4_17:38:24_MET_DST_1996
Content-Type: text/plain; charset=us-ascii


hein@hsr.no said:
> I have compiled mh-6.8.4 with the scan.patch which was included with 
> exmh, but without any success. It still gives me the crappy 
> iso-string...

> Anyone have any expirence with this?

> Do I still have to recompile with the unsigned option? If so, do I 
> really have to compile the whole distribution? 

I do not think it's a good idea to recompile the whole mh with
"-funsigned-char".  Some parts of the code assumes that characters
are signed, as these warnings from gcc indicates.

burst.c:231: warning: comparison is always 0 due to limited range of data type
post.c:1447: warning: comparison is always 0 due to limited range of data type
post.c:1448: warning: comparison is always 0 due to limited range of data type
post.c:1557: warning: comparison is always 0 due to limited range of data type
post.c:1558: warning: comparison is always 0 due to limited range of data type
post.c:1862: warning: comparison is always 0 due to limited range of data type
post.c:1888: warning: comparison is always 0 due to limited range of data type

Instead I did the following (with mh-6.8.4 on Solaris 2.4):

  1. Added "options LOCALE" in the MH config file.
     This will enable a setlocale call in several programs (which will modify
     the toupper, isspace, iscntrl, etc. ).
     Also check the you have added "options RFC1342".

  2. Modified formatsbr.c to mask high order bits in calls of isXXXX macros.
     This way they can be called with signed (or unsigned) chars.

     I also added one more call to maybe_decode_rfc1342 in formatsbr.c 
     to decode ISO-8859-1 chars in the note field of a mail address
     (the name within parentheses).

  3. I also added some code to the rfc1342.c file in the scan.patch to
	- Also allow us-ascii when MM_CHARSET is iso-8859-1 (since
          us-ascii is a subset).
        - Skip quoted null character which otherwise would terminate the
          string prematurely.  (A mail gateway near us inserts this garbage.)
        - Handle base64 coded header words.

  4. When running exmh (or mh) you should set MM_CHARSET and LC_CTYPE, e.g.

	setenv MM_CHARSET iso-8859-1
	setenv LC_CTYPE iso_8859_1

Hope this helps!

	Ola
  
-- 
Ola Stromfors                   Email:  Ola.S.Stromfors@telia.se 
Telia Engineering AB            Tel:    +46 13 235530
Teknikringen 2                  Fax:    +46 13 213635
S-583 30 Linkoping, Sweden


--===_0_Tue_Jun__4_17:38:24_MET_DST_1996
Content-Type: text/plain; charset=us-ascii
Content-Description: formatsbr.diff
Content-Transfer-Encoding: base64

[encoded data, 5986 characters]
ICAJCSAgICBscCsrLCBsZW4tLTsKICAJICAgIH0K

--===_0_Tue_Jun__4_17:38:24_MET_DST_1996
Content-Type: text/plain; charset=us-ascii
Content-Description: rfc1342.c
Content-Transfer-Encoding: base64

[encoded data, 5986 characters]
KTsKfQojZW5kaWYK

--===_0_Tue_Jun__4_17:38:24_MET_DST_1996--


