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 651783 - "Failed to convert UTF-8 string to JS string" for Persian specific unicode letters
"Failed to convert UTF-8 string to JS string" for Persian specific unicode le...
Status: RESOLVED NOTGNOME
Product: gnome-shell
Classification: Core
Component: general
3.0.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-03 13:54 UTC by Hedayat Vatankhah
Modified: 2012-08-27 20:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hedayat Vatankhah 2011-06-03 13:54:37 UTC
A while ago I faced this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=704893

In brief, running Firefox in fa_IR locale generates lots of "Failed to convert UTF-8 string to JS string" exceptions in gnome shell. 
After some investigation, I found the exact reason: in Firefox translation in the branding section, 'Firefox' is translated to 'فایرفاکس', which contains some Arabic letters and two Persian specific unicode letters: Persian/Farsi Yeh, and Persian/Farsi Keh (or Kaf. I don't know the exact unicode name). If these letters, or other Persian specific letters such as "Zhe" appears in an string, gnome-shell is unable to convert that UTF-8 string to JS string with the above error messages. 

This bug is sever and makes gnome-shell almost unusable when such letters appear in an application name (given by app.get_name()). 

Thanks
Comment 1 Hedayat Vatankhah 2011-06-03 19:13:54 UTC
Well, looks like that this is a problem with Firefox only... I'm confused. Maybe firefox has conversion problems, since it seems the even without those problematic letters, the firefox title in the top bar and Alt+Tab doesn't appear correctly and is not readable. The same thing is true for firefox in other languages like Arabic: while it doesn't produce the mentioned problems, the title doesn't appear correctly in the top bar and Alt+Tab list, and is not readable.
Comment 2 Hedayat Vatankhah 2011-06-03 19:32:19 UTC
I suspect that there is something wrong with firefox encoding. However, gnome shell should handle situations where the string cannot be converted to JS string gracefully, rather than losing the focus of all windows when trying to switch between them using Alt+tab, which requires a restart of gnome-shell and closing the problematic application.
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-07-21 16:19:11 UTC
This was a gjs/libmozjs bug that should have been fixed recently (bug #643479). Are you still seeing this?
Comment 4 Hedayat Vatankhah 2011-07-21 16:40:11 UTC
It seems that gjs has not updated in Fedora 15 yet, so I'm not sure if I can try the new fix currently. I'll try again as soon as a new update appeared for Fedora.
Comment 5 Hedayat Vatankhah 2011-10-20 12:05:47 UTC
Firefox have fixed it's branding translation bug (it is not translated at all), so the bug doesn't appear normally. However, if I change the branding, I'll get the same error messages and keyboard stops working in gnome-shell 3.2. (I'm using gjs-1.30).
Comment 6 Giovanni Campagna 2012-08-27 20:16:42 UTC
_NET_WM_NAME is defined to be a UTF8_STRING, and .desktop files are defined to be UTF-8.
If an application puts strings in the locale enconding instead of UTF-8 there, it's not a gnome-shell bug, so I'm tentatively closing this NOTGNOME.