After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692746 - history uses wrong encoding to show utf8 logs
history uses wrong encoding to show utf8 logs
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Archives
3.9.x
Other Linux
: Normal major
: ---
Assigned To: empathy-maint
empathy-maint
: 692984 699193 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-28 22:38 UTC by Serge Gavrilov
Modified: 2013-05-24 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cyrillic logs in empathy 3.6.3 (99.63 KB, image/png)
2013-01-28 22:41 UTC, Serge Gavrilov
  Details
use g_utf8_strescape instead of g_strescape (581 bytes, patch)
2013-05-18 15:54 UTC, Igor Gnatenko
none Details | Review

Description Serge Gavrilov 2013-01-28 22:38:41 UTC
Hi! 

My distro is gentoo ~amd64. Today I I have upgraded from gnome 3.4 up to 3.6. Empathy was upgraded up to 3.6.3. 

After upgrade I have noticed that history (previous conversations) shows my log in wrong way (it looks like utf8 text interpreted as a single byte encoding text): see screenshot.

I have checked that my logs in ~/.local/share/TpLogger/ are in utf8. Then I downgrade empathy up to 3.6.2 and restart gnome-session. This is fixed my problem. I have checked several times and can confirm that with empathy 3.6.2 the bug is not reproducible, but reproducible with 3.6.3.
Comment 1 Serge Gavrilov 2013-01-28 22:41:10 UTC
Created attachment 234671 [details]
cyrillic logs in empathy 3.6.3
Comment 2 Serge Gavrilov 2013-01-29 08:02:53 UTC
It is not surprising that problematic commit is
http://git.gnome.org/browse/empathy/commit/?h=gnome-3-6&id=1e7449f5a14e2f031389808206c9991f65d3ade7
Comment 3 Frederic Peters 2013-02-01 08:02:17 UTC
*** Bug 692984 has been marked as a duplicate of this bug. ***
Comment 4 Serge Gavrilov 2013-02-28 13:09:02 UTC
Do you plan to fix this for 3.8?
Comment 5 Robin Stocker 2013-02-28 13:43:18 UTC
Confirmed. This is also a problem for German, French, etc.
Comment 6 Alex Shpilkin 2013-03-14 22:00:53 UTC
The problem here is that g_strescape changed its specifications over time - from the UTF-8-compatible "double every backslash" to ASCII-only "escape everything except 0x20 through 0x7E". Would it be right to invent a new backslash-doubling function for empathy-log-window.c specifically? Not pretty, but passing a 128-character exception string to g_strescape is even less so.

(The backslashes get interpreted when pasted into Javascript by insert_or_change_row and friends, right?)
Comment 7 Al-Scandar Solstag 2013-05-10 06:00:04 UTC
Ni! Bug still present in Empathy 3.8.1
Comment 8 xgdgsc 2013-05-13 05:52:17 UTC
Same with Chinese and 3.8.1.  Why is this still new?
Comment 9 xgdgsc 2013-05-13 05:53:13 UTC
*** Bug 699193 has been marked as a duplicate of this bug. ***
Comment 10 Igor Gnatenko 2013-05-18 08:08:38 UTC
confirm. 3.8.2.
Comment 11 Igor Gnatenko 2013-05-18 11:48:43 UTC
I think this bug duplicate of bug #89548
Comment 12 Igor Gnatenko 2013-05-18 15:54:28 UTC
Created attachment 244626 [details] [review]
use g_utf8_strescape instead of g_strescape

Need update bug.
Add blocker bugs: bug #89548
Apply patch after close bug #89548 .
Comment 13 Igor Gnatenko 2013-05-18 18:37:39 UTC
Please change Version to git
Comment 14 Jean-François Fortin Tam 2013-05-19 20:50:33 UTC
There is no "git" product version for this component.
xgdgsc: NEW is "confirmed" in gnome bugzilla.
Comment 15 Igor Gnatenko 2013-05-19 21:13:58 UTC
(In reply to comment #14)
> There is no "git" product version for this component.
Thx for the correction. I not owner of this bug.
Comment 16 Guillaume Desmottes 2013-05-24 12:47:37 UTC
I reverted the commit introducing this regression. I'll do a 3.8 release shortly.

commit 7e2db943e0c9a6f5764504460e64ffec9bb87d67
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Fri May 24 14:43:27 2013 +0200

    Revert "log-window: escape the body of the message"
    
    This commit introduced a nasty regression breaking UTF-8 logs (#692746).
    I prefer to revert it as #691085 was a far less anoying bug.
    
    We'll re-fix #691085 once we'll have a UTF-8 friendly escape function in GLib
    (#89548).
    
    This reverts commit 1e7449f5a14e2f031389808206c9991f65d3ade7.