NetBSD Problem Report #19689
Received: (qmail 1996 invoked by uid 605); 5 Jan 2003 08:18:40 -0000
Message-Id: <200301050816.h058Gjs02826@crusoe.naobsd.org>
Date: Sun, 5 Jan 2003 17:16:45 +0900 (JST)
From: FUKAUMI.Naoki@crusoe.naobsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: FUKAUMI.Naoki@crusoe.naobsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: wm/bsetroot nls catalog handling (setlocale) is broken
X-Send-Pr-Version: 3.95
>Number: 19689
>Category: pkg
>Synopsis: wm/bsetroot nls catalog handling (setlocale) is broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jschauma
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 05 08:19:00 +0000 2003
>Closed-Date: Thu Feb 20 16:51:36 +0000 2003
>Last-Modified: Sat Apr 29 09:03:13 +0000 2006
>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:
bsetroot says `failed to open catalog, using default messages'
setlocale(LC_ALL, "") return value is different between our
implementation and what bsetroot expect.
e.g.) LANG=ja_JP.eucJP
our impl: C/ja_JP.eucJP/C/C/C/ja_JP.eucJP
bsetroot: ja_JP.eucJP@foobar
bsetroot::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/blackbox.cat' as catalog path name ;)
>How-To-Repeat:
Run bsetroot with ktrace, and kdump | grep NAMI
>Fix:
Adhoc patch.
XXX wm/blackbox also has similar problem.
XXX I don't use blackbox. this patch is only tested for bsetroot.
XXXXXX bsetroot use `blackbox.cat' which is provided by blackbox
XXXXXX package. so if you don't install wm/blackbox, bsetroot
XXXXXX says forever `failed to open catalog...' after this patch!
--- src/i18n.cc.orig Wed May 15 17:33:42 2002
+++ src/i18n.cc Sun Jan 5 02:13:27 2003
@@ -69,6 +69,7 @@
if (MB_CUR_MAX > 1)
mb = True;
// truncate any encoding off the end of the locale
+ locale = setlocale(LC_MESSAGES, "");
char *l = strchr(locale, '@');
if (l) *l = '\0';
l = strchr(locale, '.');
>Release-Note:
>Audit-Trail:
Date: Sun, 5 Jan 2003 14:53:35 -0500
From: Jan Schaumann <jschauma@netmeister.org>
Sender: gnats-bugs-owner@netbsd.org
Message-Id: <20030105195335.GD6582@netmeister.org>
To: FUKAUMI.Naoki@crusoe.naobsd.org
Cc: gnats-bugs@gnats.netbsd.org
In-Reply-To: <200301050816.h058Gjs02826@crusoe.naobsd.org>
Subject: Re: wm/bsetroot nls catalog handling (setlocale) is broken
References: <200301050816.h058Gjs02826@crusoe.naobsd.org>
FUKAUMI.Naoki@crusoe.naobsd.org wrote:
> --- src/i18n.cc.orig Wed May 15 17:33:42 2002
> +++ src/i18n.cc Sun Jan 5 02:13:27 2003
> @@ -69,6 +69,7 @@
> if (MB_CUR_MAX > 1)
> mb = True;
> // truncate any encoding off the end of the locale
> + locale = setlocale(LC_MESSAGES, "");
> char *l = strchr(locale, '@');
> if (l) *l = '\0';
> l = strchr(locale, '.');
I'm not sure this is correct: In this file, we already set
locate = setlocale(LC_ALL, "");
in line 61. Are you saying that it needs to be set _again_ specifically
for LC_MESSAGES on NetBSD?
I'm not much of an i18n coding person, but setlocale(3) doesn't mention
LC_MESSAGES, but indicates that LC_ALL should have covered that case,
no?
-Jan
--
Of course it runs NetBSD! http://www.netbsd.org
From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/19689 CVS commit: pkgsrc/wm/bsetroot
Date: Sun, 5 Jan 2003 21:58:48 +0200 (EET)
Module Name: pkgsrc
Committed By: jschauma
Date: Sun Jan 5 19:58:47 UTC 2003
Modified Files:
pkgsrc/wm/bsetroot: Makefile PLIST distinfo
Added Files:
pkgsrc/wm/bsetroot/patches: patch-ab
Log Message:
Install NLS files for bsetroot, so that bsetroot does not complain
whne blackbox is not installed (as may be the case if fluxbox or
openbox are used).
This addresses one of the problems mentioned in PR pkg/19689.
To generate a diff of this commit:
cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/wm/bsetroot/Makefile \
pkgsrc/wm/bsetroot/PLIST pkgsrc/wm/bsetroot/distinfo
cvs rdiff -r0 -r1.1 pkgsrc/wm/bsetroot/patches/patch-ab
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: jschauma
State-Changed-When: Mon Jan 6 13:16:15 PST 2003
State-Changed-Why:
I'm not sure this is correct: In this file, we already set
locate = setlocale(LC_ALL, "");
in line 61. Are you saying that it needs to be set _again_ specifically
for LC_MESSAGES on NetBSD?
I'm not much of an i18n coding person, but setlocale(3) doesn't mention
LC_MESSAGES, but indicates that LC_ALL should have covered that case,
no?
Responsible-Changed-From-To: pkg-manager->jschauma
Responsible-Changed-By: jschauma
Responsible-Changed-When: Mon Jan 6 13:16:15 PST 2003
Responsible-Changed-Why:
I'll take this one.
State-Changed-From-To: feedback->closed
State-Changed-By: jschauma
State-Changed-When: Thu Feb 20 08:50:44 PST 2003
State-Changed-Why:
I added the patch which closedPR pkg/19688, which fixes this problem.
Thanks for the PR.
From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/19689 CVS commit: pkgsrc/wm/bsetroot
Date: Thu, 20 Feb 2003 18:50:18 +0200 (EET)
Module Name: pkgsrc
Committed By: jschauma
Date: Thu Feb 20 16:50:17 UTC 2003
Modified Files:
pkgsrc/wm/bsetroot: Makefile distinfo
Added Files:
pkgsrc/wm/bsetroot/patches: patch-ac
Log Message:
Add patch based on PR pkg/20009, to fix the problem mentioned in
PR pkg/19689, closing that PR.
Bump PKG_REVISION.
To generate a diff of this commit:
cvs rdiff -r1.3 -r1.4 pkgsrc/wm/bsetroot/Makefile
cvs rdiff -r1.2 -r1.3 pkgsrc/wm/bsetroot/distinfo
cvs rdiff -r0 -r1.1 pkgsrc/wm/bsetroot/patches/patch-ac
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/19689 CVS commit: pkgsrc/wm/blackbox
Date: Thu, 20 Feb 2003 18:54:18 +0200 (EET)
Module Name: pkgsrc
Committed By: jschauma
Date: Thu Feb 20 16:54:17 UTC 2003
Modified Files:
pkgsrc/wm/blackbox: Makefile distinfo
Added Files:
pkgsrc/wm/blackbox/patches: patch-ac
Log Message:
Add patch which closed PR pkg/19689, as both packages use the same sources.
This patch was sent to the blackbox maintainers as well.
Bump PKG_REVISION.
To generate a diff of this commit:
cvs rdiff -r1.10 -r1.11 pkgsrc/wm/blackbox/Makefile
cvs rdiff -r1.5 -r1.6 pkgsrc/wm/blackbox/distinfo
cvs rdiff -r0 -r1.1 pkgsrc/wm/blackbox/patches/patch-ac
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.