[email protected]
[Top] [All Lists]

Bug#259376: marked as forwarded (snownews: Doesn't display well in non-U

Subject: Bug#259376: marked as forwarded snownews: Doesn't display well in non-UTF8 charsets
From: Debian Bug Tracking System
Date: Mon, 03 Jan 2005 22:33:11 -0800
Your message dated Tue, 4 Jan 2005 06:16:07 +0000
with message-id <[email protected]>
has caused the Debian Bug report #259376,
regarding snownews: Doesn't display well in non-UTF8 charsets
to be marked as having been forwarded to the upstream software
author(s) Oliver Feiler <[email protected]>.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at 259376-forwarded) by bugs.debian.org; 4 Jan 2005 06:16:10 +0000
>From [email protected] Mon Jan 03 22:16:10 2005
Return-path: <[email protected]>
Received: from (dot.nahmias.net) [] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1ClhzG-0004rn-00; Mon, 03 Jan 2005 22:16:10 -0800
Received: by dot.nahmias.net (Postfix, from userid 1000)
        id 610451FD72; Tue,  4 Jan 2005 06:16:07 +0000 (UTC)
Date: Tue, 4 Jan 2005 06:16:07 +0000
To: Oliver Feiler <[email protected]>
Cc: Sebastian Rasmussen <[email protected]>,
        [email protected]
Subject: Snownews patch to use terminal's encoding
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
From: [email protected] (Joseph Nahmias)
Delivered-To: [email protected]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Hello Oliver,

We've had a bug[0] in the Debian BTS about the way that snownews
converts text into the terminal's encoding.  The issue is that the
proper way to do it is to dynamically determine the current encoding of
the terminal -- rather than hardcoding an encoding into TARGET_CHARSET.

One of our users has thoughtfully provided a patch to do just that (see
below).  The patch looks good to me, and I will probably incorporate it
(in some form) into the next debian package.  I was wondering if you
would like to include it in the next version you release as well.  If
so, let me know so that I do not do double-work.

Hope you had a happy new year!
--Joe, your friendly Debian pacakge maintainer

[0] http://bugs.debian.org/snownews

----- Forwarded message from Sebastian Rasmussen <[email protected]> -----
Subject: Bug#259376: Patch for encoding issues in snownews
Date: Sun, 02 Jan 2005 17:41:45 +0100

Package: snownews
Followup-For: Bug #259376


I'd like to propose the following patch for correcting the
encoding issue in snownews This way snownews uses
whatever encoding the current terminal uses regardless if
you are using UTF-8 or (in my case) ISO-8859-1. And as far
as I can see this shouldn't even produce any additional build
dependencies as nl_langinfo() is available in libc.

/ Sebastian Rasmussen

diff -Nruw snownews- snownews-
--- snownews-   2004-10-31 22:09:14.000000000 +0100
+++ snownews-   2005-01-02 17:26:18.000000000 +0100
@@ -27,10 +27,9 @@
#include "version.h"
#include "netio.h"

-/* Set your charset here. ISO-8859-1 is default. */
-#define TARGET_CHARSET "ISO-8859-1"
+/* Set your charset here. This overrides the CODESET setting
+   as reported by nl_langinfo() */
+/* #define TARGET_CHARSET "UTF-8" */

struct feed {
       char *feedurl;                                                  /* 
Non hashified URL */
@@ -123,10 +122,16 @@
#      include <libintl.h>
#      include <locale.h>
+#       include <langinfo.h>

#      define _(String) gettext (String)
+#      define TARGET_CHARSET nl_langinfo(CODESET)
#      define _(String) (String)s
#      define ngettext(Singular, Plural, n) (Plural)
diff -Nruw snownews- snownews-
--- snownews-        2004-10-31 22:09:14.000000000 +0100
+++ snownews-        2005-01-02 
17:17:33.000000000 +0100
@@ -1121,7 +1121,8 @@
                               columns = COLS-9-strlen(_("new"));

-                       mvaddnstr (ypos, 1, cur_ptr->title, columns);
+                       localized_msg = iconvert(cur_ptr->title);
+                       mvaddnstr (ypos, 1, localized_msg, columns);
                       if (xmlStrlen(cur_ptr->title) > columns)
                               mvaddstr (ypos, columns+1, "...");

To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#259376: marked as forwarded (snownews: Doesn't display well in non-UTF8 charsets), Debian Bug Tracking System <=