🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #47553

Re: slrn and latin0

#47553
From: John E. Davis
Date: Fri, 26 Mar 1999 00:00
83 lines
3166 bytes
On Fri, 26 Mar 1999 01:50:38 +0100, Johnny Tevessen <j.tevessen@gmx.de>
wrote:
>Well, could you please become more specific? A patch perhaps,
>or a docu about how to change character sets in mime.c?

There is an object in mime.c that looks like:

static char *Compatable_Charsets[] =
{
   "US-ASCII",			       /* This MUST be zeroth element */
   "ISO-8859-1",
   "ISO-8859-2",
   "ISO-8859-3",
   "ISO-8859-4",
   "ISO-8859-5",
   "ISO-8859-6",
   "ISO-8859-7",
   "ISO-8859-8",
   "ISO-8859-9",
   "iso-latin1",		       /* knews adds his one */
   "KOI8-R",
   NULL
};

Just add ISO-8859-15 to this list and recompile.  Of course, add it
before NULL.  For what it is worth, here is a patch that the next
version will contain:

--- release/slrn/src/mime.c	Thu Nov  5 13:05:14 1998
+++ slrn/src/mime.c	Tue Mar  9 14:56:59 1999
@@ -77,19 +77,13 @@
 
 char *Slrn_Mime_Display_Charset;
 
-/* These are all supersets of US-ASCII */
+/* These are all supersets of US-ASCII.  Only the first N characters are 
+ * matched, where N is the length of the table entry.
+ */
 static char *Compatable_Charsets[] =
 {
    "US-ASCII",			       /* This MUST be zeroth element */
-   "ISO-8859-1",
-   "ISO-8859-2",
-   "ISO-8859-3",
-   "ISO-8859-4",
-   "ISO-8859-5",
-   "ISO-8859-6",
-   "ISO-8859-7",
-   "ISO-8859-8",
-   "ISO-8859-9",
+   "ISO-8859-",
    "iso-latin1",		       /* knews adds his one */
    "KOI8-R",
    NULL
@@ -149,12 +143,16 @@
    compat_charset = Compatable_Charsets;
    while (*compat_charset != NULL)
      {
-	if ((0 == slrn_case_strncmp ((unsigned char *) cs,
-				     (unsigned char *) *compat_charset,
-				     len))
-	    && (len == strlen(*compat_charset)))
-	  return *compat_charset;
+	unsigned int len1;
 	
+	len1 = strlen (*compat_charset);
+	if (len1 <= len) 
+	  {
+	     if (0 == slrn_case_strncmp ((unsigned char *) cs,
+					 (unsigned char *) *compat_charset,
+					 len1))
+	       return *compat_charset;
+	  }
 	compat_charset++;
      }
    return NULL;

-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis     Cambridge, MA  02139-4307

Technical Details
Message-ID: <slrn7fm0h9.vai.davis@aluche.mit.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn7flcga.mja.j.tevessen@entity.gmx.de> <slrn7flja5.v9f.davis@aluche.mit.edu> <slrn7flmeu.nd2.j.tevessen@entity.gmx.de>

Show Full Headers
Complete Article Headers
Message-ID: <slrn7fm0h9.vai.davis@aluche.mit.edu>
Subject: Re: slrn and latin0
Date: Fri, 26 Mar 1999 00:00:00 +0000
From: davis@space.mit.edu (John E. Davis)
References: <slrn7flcga.mja.j.tevessen@entity.gmx.de> <slrn7flja5.v9f.davis@aluche.mit.edu> <slrn7flmeu.nd2.j.tevessen@entity.gmx.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 459206813
X-Complaints-To: usenet@eecs-usenet-02.mit.edu
X-Trace: eecs-usenet-02.mit.edu 922419755 20509 18.75.2.45 (26 Mar 1999 03:42:35 GMT)
Organization: Center for Space Research
User-Agent: slrn/0.9.5.4 (UNIX)
Reply-To: davis@space.mit.edu
NNTP-Posting-Date: 26 Mar 1999 03:42:35 GMT
Newsgroups: news.software.readers