Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 65803

Summary: fluxbox-0.9.10-r3: wrong window titles in ru_RU.UTF-8
Product: Gentoo Linux Reporter: Victor Yegorov <viy>
Component: Current packagesAssignee: Commonbox Team <commonbox>
Status: RESOLVED FIXED    
Severity: minor CC: reznikmm
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://optipay.nordlb.lv/images/tmp/2004-09-23-105442_1024x768_scrot.png
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to remove this bug
Debug output

Description Victor Yegorov 2004-09-29 06:18:38 UTC
USE="truetype -nls -kde -gnome"

When I use "LANG=ru_RU.UTF-8 exec fluxbox" in my .xinitrc, all window titles in Russian are displayed in a strange manner... Guess, it is so not only for Russian chars.

You can look at this topic (in Russian): http://forums.gentoo.org/viewtopic.php?t=227232

Reproducible: Always
Steps to Reproduce:
1. Make sure your locale is ru_RU.UTF-8
2. start fluxbox in your favourite way
3. Use Firefox/Mozilla and go here: http://rus.delfi.lv --- the easiest way to get window with Russian chars in it.

Actual Results:  
Well, see the screenshot, I'm writing a post to the forums.gentoo.org there.

Expected Results:  
Russian chars should be displayed correctly.

I've searched the code and found a place, where this bug is happening. It is
"src/FbTk/XmbFontImp.cc" file, function "XFontSet createFontSet(const char
*fontname, bool utf8mode)".

And more --- I've made a patch and ebuild, that corrects this bug. But I don't
know, how to attach them here.

Genral idea --- setlocale returns pointer to a static storage, it's contents is
unstable between sequential calls to setlocale.
Comment 1 Victor Yegorov 2004-09-29 06:20:46 UTC
Created attachment 40703 [details, diff]
Patch to remove this bug

There are minor additions to the fluxbox code. Also, I've added a rather big
comment about why bug happens.
Comment 2 Victor Yegorov 2004-09-29 06:22:37 UTC
Created attachment 40704 [details]
Debug output

This is debug out, that shows, how area, being pointed to by orig_locale, is
changed by calls to setlocale,
Comment 3 Maxim Reznik 2004-10-01 08:55:03 UTC
When I start fluxbox 0.9.10 with LANG=ru_RU.KOI8-R I have all nonrussian characters disappeared (in menu, titles, toolbox). May be it's the same bug.
Comment 4 Ciaran McCreesh 2004-10-02 09:16:01 UTC
http://www.cse.unsw.edu.au/~simonb/fluxbox/fluxbox.font_locale.patch

How's that one look? That's from upstream, looks like the same fix. I'll roll an -r4 with that and a few other things shortly.
Comment 5 Victor Yegorov 2004-10-02 11:58:49 UTC
I think it's the same. Not sure for 100%, just 95% ;)
Comment 6 Victor Yegorov 2004-10-06 02:49:05 UTC
I see a new ebuild, fluxbox-0.9.10-r4 in the tree. But this bug is not being fixed
in it, neither by upstream's patch, nor by mine.

Will it be fixed?
Comment 7 Ciaran McCreesh 2004-10-06 08:29:42 UTC
Well, upstream think that their patch fixes it. If it doesn't, please take it up with them.
Comment 8 Victor Yegorov 2004-10-07 04:05:31 UTC
You misunderstood me, I ment to say --- their patch isn't included into fluxbox-0.9.10-r4-biiiiig-update.patch

So --- it is absent in new, -r4 ebuild


P.S. Yes, I've done emerge sync during last 5 minutes. Then:
ebuild ${PORTDIR}/x11-wm/fluxbox/fluxbox-0.9.10-r4.ebuild clean
ebuild ${PORTDIR}/x11-wm/fluxbox/fluxbox-0.9.10-r4.ebuild unpack

XmbFontImp.cc just the same, as in 0.9.10-r3

Maybe, they've changed their patch regarding this bug?
Comment 9 Ciaran McCreesh 2004-10-07 11:07:09 UTC
Bleh! It's supposed to be in there... I think I must've been hit by a lag in sourceforge's anon cvs setup... Sorry...
Comment 10 Ciaran McCreesh 2004-10-07 11:20:03 UTC
Ok, please leave it a few hours, sync, then reemerge -r4. If you see this:

 * Applying fluxbox-0.9.10-eat-this-setlocale.patch...                    [ ok ]

it should be working. I didn't do a revbump, probably not worth it for just this patch.