🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Johnny Tevessen Thu, 25 Mar 1999 00:00
slrn and latin0
#47536
Author: Johnny Tevessen
Date: Thu, 25 Mar 1999 00:00
14 lines
1137 bytes
Hi!

I'm using slrn-0.9.5.4, and it is not able to
decode iso-8859-15 (aka ``latin0'') in headers
like ``Subject:''. At least mine here doesn't.

Is this going to be subject of change?

ciao,
johnny
-- 
echo '$0&$0'>_;chmod +x _;sh ./_

Re: slrn and latin0
#47524
Author: John E. Davis
Date: Thu, 25 Mar 1999 00:00
15 lines
1230 bytes
On Thu, 25 Mar 1999 23:00:42 +0100, Johnny Tevessen <j.tevessen@gmx.de>
wrote:
>I'm using slrn-0.9.5.4, and it is not able to
>decode iso-8859-15 (aka ``latin0'') in headers
>like ``Subject:''. At least mine here doesn't.
>
>Is this going to be subject of change?

The next version will support all ISO-8859-XX character sets.  For
now, add an entry for that character set to slrn/src/mime.c and
recompile.

--John

Re: slrn and latin0
#47543
Author: Johnny Tevessen
Date: Fri, 26 Mar 1999 00:00
13 lines
1250 bytes
Quoting John E. Davis <davis@space.mit.edu>:

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

Thank you very much.

ciao,
johnny
-- 
echo '$0&$0'>_;chmod +x _;sh ./_

Re: slrn and latin0
#47548
Author: Johnny Tevessen
Date: Fri, 26 Mar 1999 00:00
25 lines
1667 bytes
Quoting John E. Davis <davis@space.mit.edu>:

> The next version will support all ISO-8859-XX character sets.

Great!

> For now, add an entry for that character set to slrn/src/mime.c and
> recompile.

Well, could you please become more specific? A patch perhaps,
or a docu about how to change character sets in mime.c?

At the moment, making slrn believing that iso15 is equal
to iso1 would be quite fine (a local screen charset given).

For now, I just set ``set mime_charset "iso-8859-15"'' in my
.slrnrc to be able to use the Euro character. It works, but
the iso15 encoded headers are not recognized.

ciao,
johnny
-- 
echo '$0&$0'>_;chmod +x _;sh ./_

Re: slrn and latin0
#47553
Author: 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

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads