Subject: pkg/19688: wm/fluxbox nls catalog handling (setlocale) is broken
To: None <>
From: None <>
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
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 1.6K
System: NetBSD 1.6K NetBSD 1.6K (NT310S) #0: Sun Jan 5 01:29:32 JST 2003 i386
Architecture: i386
Machine: i386
	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/ 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/' as catalog path name ;)

	Run fluxbox with ktrace, and kdump | grep NAMI

	Adhoc patch.
--- src/	Sat Dec  7 23:14:05 2002
+++ src/	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