By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 1407

Summary: notification popups do not support UTF8
Product: TDE Reporter: Francois Andriot <albator78>
Component: tdelibsAssignee: Slávek Banko <slavek.banko>
Status: RESOLVED FIXED    
Severity: normal CC: albator78, bugwatch, darrella, slavek.banko
Priority: P5    
Version: 3.5.13 [Trinity]   
Hardware: All   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: kdbusnotification : fix utf8 messages
Fix missing DBUS version macros

Description Francois Andriot 2013-02-17 13:47:38 CST
Hello, when displaying notifications from applications (incoming mails from thunderbird, for example), if the text to be displayed contains UTF8 caracters, it is not displayed correctly.

How to reproduce:
  zenity --notification --text="bébé"

You'll notice that the "é" caracter is garbage. Is shows that an UTF8 string is rendered as LATIN1.
Comment 1 Darrell 2013-03-04 17:53:53 CST
UTF8 works with kdialog:

kdialog --title "Bébé" --msgbox "bébé bébé bébé"

Is the problem actually zenity or GTK?
Comment 2 Francois Andriot 2013-03-04 23:43:13 CST
Using the same zenity command under KDE4 displays the popup normally ...
Also, any popup message displayed under TDE has the problem. For example, when I unplug the AC adapter from my laptop, kpowersave shows a garbage message too ...  Mozilla thunderbird too ... Zenity is just a way to reproduce the problem.

It's not specific to the application that sends the message.
Comment 3 Darrell 2013-04-28 13:01:58 CDT
Francois, Tim,

How much work is required to fix this? Should we add this report to the R14.0.0 etherpad?
Comment 4 Francois Andriot 2013-04-28 13:05:33 CDT
It looks like the issue is limited to some GTK2 applications after all.

E.G:
- when using TDE's krandrtray to change resolution, the text in popup appears correctly with french caracters.
- I cannot reproduce the bug with Zenity (do not understand why, it was so easy)
- Firefox and Thunderbird still show badly encoded messages, whereas the same messages are correct under KDE4.
Comment 5 Francois Andriot 2013-07-20 04:52:36 CDT
Created attachment 1352 [details]
kdbusnotification : fix utf8 messages

OK I've found that the messages that were badly displayed were coming through kdbusnotification.
The attached patch fixes this.
Now everything looks OK.
Comment 6 Darrell 2013-07-30 14:03:35 CDT
I was going to test this patch when I realized the patch is for kdbusnotification. I never built or installed this package. The sources contain no notes or README files explaining the purpose of the package or for whom the package is intended. I can't find any references on the web.

So, um, my silly questions are what does this package do and for whom is the package intended?
Comment 7 Francois Andriot 2013-07-30 14:29:04 CDT
Hello,
this package contains the "notification daemon" for TDE, using "libnotify".
It is a standard way to allow applications to display popup notifications in any Desktop environment (KDE4, gnome ...).

For example, Firefox send a message "All download finished", Thunderbird sends message "you have 3 new mails".
When kdbusnotification is installed in TDE, the messages are displayed as small popups at the bottom-right of the screen, near the clock.
If kdbusnotification is not installed, you never see these messages.

If you don't know what the messages look like, they look the same as some TDE built-in popups, for example:
- when yakuake starts
- when tderandrtray has changed the resolution
- when tdenetworkmanager has connected to a network

This utility is very convenient, I never use TDE without it.
Comment 8 Darrell 2013-07-30 15:34:01 CDT
Thank you for the information. I learn something new every day. :-)

I will try building the package along with the proposed patch.
Comment 9 Darrell 2013-07-30 16:50:09 CDT
Not related to the patch but I see the following in my build log:

daemon.cpp:162:30: warning: "DBUS_MAJOR_VER" is not defined [-Wundef]
daemon.cpp:162:30: warning: "DBUS_MINOR_VER" is not defined [-Wundef]
Comment 10 Darrell 2013-07-30 17:29:41 CDT
I built the package along with the proposed patch.

I see notification-daemon-tde in my process list. So far so good --- is there a simple way to test that kdbusnotification is functioning?
Comment 11 Darrell 2013-07-30 18:08:54 CDT
> is there a simple way to test that kdbusnotification is functioning?

Never mind. I found notify-send on my system. The popups work fine.

Without the patch, when I run notify-send "bébé" I see garbage for é.

With the patch the popup displays as expected.

Francois, do you have permissions to push to git?
Comment 12 Slávek Banko 2013-07-30 18:44:13 CDT
Pushed to GIT in hash 3542ae76.
Thank you all for your work.
Comment 13 Darrell 2013-07-30 19:03:39 CDT
What about the build errors mentioned in comment 9?
Comment 14 Slávek Banko 2013-07-30 19:06:35 CDT
(Odpověď na komentář #13)
> What about the build errors mentioned in comment 9?

Good point - this is not yet resolved!
Comment 15 Slávek Banko 2013-07-30 21:39:42 CDT
Created attachment 1430 [details]
Fix missing DBUS version macros

Try attached patch...
Comment 16 Darrell 2013-07-30 21:54:39 CDT
The patch eliminated the build warnings and the package functions as expected, with UTF-8 working too.

Good job!
Comment 17 Slávek Banko 2013-07-31 00:59:23 CDT
Pushed to GIT in hash 1b6c7812.