Bug 128925

Summary: Theme's config (right-click > configure) menu displays question marks instead of unicode characters.
Product: [Unmaintained] superkaramba Reporter: Daniel <dd>
Component: generalAssignee: Ryan Nickell <p0z3r>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot with problem ("?"'s in sub menu)
slimmed down theme file (skz) exsibiting the problem

Description Daniel 2006-06-10 05:40:42 UTC
Version:           0.39 (using KDE KDE 3.5.3)
Installed from:    SuSE RPMs
OS:                Linux

OpenSuse 10.1
Locale en_US.UTF-8
Fonts Arial with Unicode support. Other than at reported location, I see cyrillic everywhere, including at the top-level theme's right-click menu. However, theme's config (right-click > configure) menu displays question marks instead of unicode characters. (at least, instead of cyrillic)

I am using ugettext() from gettext.GNUTranslate method to create unicode strings. (See attached afoto.1.5b4.skz, lines 132-161 and 224-251). 
(Using just gettext() splits the unicode chars into pairs of bytes, with the characteristic "DaD1D6D1"-like output.)

If you look into the attached screenshot, you can see that 

karamba.addMenuConfigOption(widget, "sombra_user", _("Set shadow size..."))
print "Menu item #2 should be ", type(_("Set shadow size...")), _("Set shadow size...")

produces a perfectly readable output in the console
"Menu item #2 should be <type 'unicode'> Размер тени..."

I really, really wanna release the afoto soon (lotsa work comming up in a half a month) and was hoping this would be easy to fix.

I will help you diagnose this in any way I can. Just respond.
Comment 1 Daniel 2006-06-10 05:42:20 UTC
Created attachment 16543 [details]
Screenshot with problem ("?"'s in sub menu)
Comment 2 Daniel 2006-06-10 05:46:13 UTC
Created attachment 16544 [details]
slimmed down theme file (skz) exsibiting the problem

The theme is designed to test for locale using 
1. karamba.language(), (in 0.39 that returns "None", so)
2. Parsing ~/.kde/share/config/kdeglobal for "Language:"

Just set either to "ru" and you should see the problems.
Comment 3 Ryan Nickell 2006-08-09 19:29:38 UTC
I'd like to get this fixed for the 3.5.5 release for certain.
Comment 4 Ryan Nickell 2006-09-04 15:10:09 UTC
SVN commit 580777 by nickell:

BUG: 128925
More .ascii() fixing.



 M  +1 -1      karamba.cpp  


--- branches/KDE/3.5/kdeutils/superkaramba/src/karamba.cpp #580776:580777
@@ -1741,7 +1741,7 @@
   kpop -> setItemEnabled(THEMECONF, true);
 
   SignalBridge* action = new SignalBridge(this, key, menuAccColl);
-  KToggleAction* confItem = new KToggleAction (name.ascii(), KShortcut::null(),
+  KToggleAction* confItem = new KToggleAction (name, KShortcut::null(),
                                                action, SLOT(receive()),
                                                menuAccColl, key.ascii());
   confItem -> setName(key.ascii());