mutter "bug" with Meta.Window.get_description() and encodings.
- From: Amy C <mathematical coffee gmail com>
- To: gnome-shell-list gnome org
- Subject: mutter "bug" with Meta.Window.get_description() and encodings.
- Date: Wed, 6 Jun 2012 11:21:05 +1000
Hi all,
I noticed this "bug" today (could be intended/if it is a bug, probably
low priority): when a window has a non-utf8 character in its name,
window.get_description() throws an error:
JS ERROR: !!! message = '"Failed to convert UTF-8 string to JS
string: Invalid byte sequence in conversion input"'
However window.get_title() handles the conversion properly.
As an example, point your browser at this page:
http://pvdevtools.readthedocs.org/en/latest/devel/vcs/mercurial/commands/graft.html
The title is "hg graft --- Some development tools", where the "---" is
an em dash (? or at least looks like one).
Then get its Meta.Window `win`, and do `win.get_title()`: you'll get
"hg graft --- Some development tools - Chrome" (em dash displays as
one).
Then try `win.get_description()` and you'll get the error. My guess is
it's choking up on the "---".
Not sure how to fix it - but the relevant code is in
mutter/src/core/window-props.c, where it assigns window->desc to be
"[window's XID] ([title truncated to 10 chars])".
cheers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]