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 110547 - status-item-view text isn't UTF-8
status-item-view text isn't UTF-8
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-0.14.0 betas
Other Linux
: Normal normal
: 0.14.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2003-04-11 12:24 UTC by Charles Kerr
Modified: 2006-06-18 05:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Kerr 2003-04-11 12:24:47 UTC
While downloading an article whose subject header has the letter 'a'
with an accent over it, status-item-view filled up the error log
with thousands of `sending invalid utf-8 sequence to pango' messages.
Comment 1 Christophe Lambin 2003-04-15 21:30:57 UTC
nntp_download_headers() runs the subject through pan_header_to_utf8
(), so it should be in UTF-8 already.  The only case where this 
would not happen is if the conversion fails (faillback to g_strdup
()).

I guess status-item-view could do a g_validate_utf8() and fall back 
to a generic description in this case ?


Comment 2 Christophe Lambin 2003-04-22 20:01:48 UTC
Backtrace of this event:

  • #0 g_log
    from /usr/lib/libglib-2.0.so.0
  • #1 pango_layout_set_text
    from /usr/lib/libpango-1.0.so.0
  • #2 string_shorten_nolock
    at status-item-view.c line 142
  • #3 status_cb_mainthread
    at status-item-view.c line 203
  • #4 gui_queue_timer_cb
    at util.c line 218
  • #5 pan_timeout_wrapper
    at util.c line 166

Note the original_len: 135927072.
Comment 3 Christophe Lambin 2003-04-22 20:38:12 UTC
Eh, that seems to be a bug in RedHat9's gdb and/or gcc.  Disregard
that ... :-)

The problem is that string_shorten_nolock() treats the string as a
binary character stream and can truncate it at any position, including
in the middle of a multibyte character. This needs to be enhanced to
be UTF8-aware.
Comment 4 Christophe Lambin 2003-04-22 22:58:33 UTC
Fixed in CVS:

http://cvs.gnome.org/bonsai/cvsview2.cgi?
diff_mode=context&whitespace_mode=show&subdir=pan/pan&command=DIFF_FR
AMESET&file=status-item-view.c&rev1=1.82&rev2=1.83&root=/cvs/gnome
Comment 5 Charles Kerr 2003-04-23 16:15:28 UTC
You are the wind beneath my wings.