Subject: pkg/19688: wm/fluxbox nls catalog handling (setlocale) is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <FUKAUMI.Naoki@crusoe.naobsd.org>
List: netbsd-bugs
Date: 01/05/2003 17:01:17
>Number: 19688
>Category: pkg
>Synopsis: wm/fluxbox nls catalog handling (setlocale) is broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 05 00:04:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: FUKAUMI Naoki
>Release: NetBSD 1.6K
>Organization:
FUKAUMI Naoki
>Environment:
System: NetBSD crusoe.naobsd.org 1.6K NetBSD 1.6K (NT310S) #0: Sun Jan 5 01:29:32 JST 2003 fun@nforce.naobsd.org:/usr/obj/i386/sys/arch/i386/compile/NT310S i386
Architecture: i386
Machine: i386
>Description:
fluxbox says `failed to open catalog, using default messages'
setlocale(LC_ALL, "") return value is different between our
implementation and what fluxbox expect.
e.g.) LANG=ja_JP.eucJP
our impl: C/ja_JP.eucJP/C/C/C/ja_JP.eucJP
fluxbox : ja_JP.eucJP@foobar
fluxbox::src/i18n.cc use these strings to get catalog path name
with these pre-proccessing:
1. remove first `@' and trailing strings
2. remove first `.' and trailing strings
So we get `.../nls/C/ja_JP/fluxbox.cat' as catalog path name ;)
>How-To-Repeat:
Run fluxbox with ktrace, and kdump | grep NAMI
>Fix:
Adhoc patch.
--- src/i18n.cc.orig Sat Dec 7 23:14:05 2002
+++ src/i18n.cc Sun Jan 5 03:27:44 2003
@@ -74,7 +74,7 @@
m_multibyte = true;
// truncate any encoding off the end of the locale
-
+ m_locale = setlocale(LC_MESSAGES, "");
string::size_type index = m_locale.find('@');
if (index != string::npos)
m_locale.erase(index); //erase all characters starting at index
>Release-Note:
>Audit-Trail:
>Unformatted: