Your message dated Fri, 28 Oct 2005 17:05:59 +0200 (CEST)
with message-id <[EMAIL PROTECTED]>
has caused the Debian Bug report #322916,
regarding recode: char description language selection logic wrong
to be marked as having been forwarded to the upstream software
author(s) [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 322916-forwarded) by bugs.debian.org; 28 Oct 2005 15:13:40 +0000
>From [EMAIL PROTECTED] Fri Oct 28 08:13:40 2005
Return-path: <[EMAIL PROTECTED]>
Received: from pizarro.unex.es [158.49.8.2] (postfix)
by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
id 1EVVvH-0004cC-00; Fri, 28 Oct 2005 08:13:40 -0700
Received: from localhost (almendralejo.unex.es [158.49.8.199])
by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP id 43B1CD138A;
Fri, 28 Oct 2005 17:13:37 +0200 (CEST)
Received: from pizarro.unex.es ([158.49.8.2])
by localhost (emilio [158.49.17.20]) (amavisd-new, port 10024)
with ESMTP id 18158-02; Fri, 28 Oct 2005 17:16:04 +0200 (CEST)
Received: from guadiana.unex.es (guadiana.unex.es [158.49.17.23])
by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP id 60406D1323;
Fri, 28 Oct 2005 17:13:28 +0200 (CEST)
Received: from localhost ([127.0.0.1] ident=sanvila)
by guadiana.unex.es with esmtp (Exim 3.35 #1 (Debian))
id 1EVVv5-0005vE-00; Fri, 28 Oct 2005 17:13:28 +0200
Date: Fri, 28 Oct 2005 17:05:59 +0200 (CEST)
From: Santiago Vila <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED],
Lionel Elie Mamane <[EMAIL PROTECTED]>
Subject: Bug#322916: recode: char description language selection logic wrong
(fwd)
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <[EMAIL PROTECTED]>
Content-Disposition: INLINE
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at unex.es
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-Level:
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
HAS_PACKAGE autolearn=ham version=2.60-bugs.debian.org_2005_01_02
Hello.
A long time ago, I received this from the Debian bug system:
---------- Forwarded message ----------
From: Lionel Elie Mamane <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Date: Sat, 13 Aug 2005 16:32:46 +0200
Subject: Bug#322916: recode: char description language selection logic wrong
Package: recode
Version: 3.6-11
Severity: normal
Tags: patch
In "recode -lf us", the full-text descriptions are either in French or
in English, but the logic that selects between these two languages is
wrong. It looks only at LANG and LANGUAGE, but (cf "man 7 locale"),
the right way is to take the first to be set among:
LC_MESSAGES
LC_ALL
LANG
LANGUAGE
Patch to do that attached.
[...]
diff --recursive -u recode-3.6/debian/changelog recode-3.6.lio/debian/changelog
--- recode-3.6/debian/changelog 2005-08-13 16:21:47.000000000 +0200
+++ recode-3.6.lio/debian/changelog 2005-08-13 15:55:37.000000000 +0200
@@ -1,3 +1,9 @@
+recode (3.6-11.0) unstable; urgency=low
+
+ * Fix French vs English logic
+
+ -- Lionel Elie Mamane <[EMAIL PROTECTED]> Sat, 13 Aug 2005 15:55:37 +0200
+
recode (3.6-11) unstable; urgency=low
* Fixed FTBFS bug caused by new texi2html behaviour (Closes: #318557).
diff --recursive -u recode-3.6/src/names.c recode-3.6.lio/src/names.c
--- recode-3.6/src/names.c 2000-12-06 20:41:29.000000000 +0100
+++ recode-3.6.lio/src/names.c 2005-08-13 16:19:05.000000000 +0200
@@ -955,17 +955,22 @@
/* Decide if we prefer French or English output. */
{
- const char *string = getenv ("LANGUAGE");
+ const char *string = getenv ("LC_MESSAGES");
french = false;
- if (string && string[0] == 'f' && string[1] == 'r')
- french = true;
- else
+ string = getenv ("LC_MESSAGES");
+ if ( ! ( string && *string ) )
{
- string = getenv ("LANG");
- if (string && string[0] == 'f' && string[1] == 'r')
- french = true;
+ string = getenv ("LC_ALL");
+ if ( ! ( string && *string ) )
+ {
+ string = getenv ("LANG");
+ if ( ! ( string && *string ) )
+ string = getenv ("LANGUAGE");
+ }
}
+ if (string && string[0] == 'f' && string[1] == 'r')
+ french = true;
}
/* See which data is available. */
diff --recursive -u recode-3.6/src/testdump.c recode-3.6.lio/src/testdump.c
--- recode-3.6/src/testdump.c 2000-06-29 17:23:52.000000000 +0200
+++ recode-3.6.lio/src/testdump.c 2005-08-13 15:51:45.000000000 +0200
@@ -285,15 +285,19 @@
/* Decide if we prefer French or English output. */
french = false;
- string = getenv ("LANGUAGE");
- if (string && string[0] == 'f' && string[1] == 'r')
- french = true;
- else
+ string = getenv ("LC_MESSAGES");
+ if ( ! ( string && *string ) )
{
- string = getenv ("LANG");
- if (string && string[0] == 'f' && string[1] == 'r')
- french = true;
+ string = getenv ("LC_ALL");
+ if ( ! ( string && *string ) )
+ {
+ string = getenv ("LANG");
+ if ( ! ( string && *string ) )
+ string = getenv ("LANGUAGE");
+ }
}
+ if (string && string[0] == 'f' && string[1] == 'r')
+ french = true;
fputs (_("UCS2 Mne Description\n\n"), stdout);
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]