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 521591 - g_markup_parse_context_parse() creates GError message that is invalid UTF8.
g_markup_parse_context_parse() creates GError message that is invalid UTF8.
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 521294
 
 
Reported: 2008-03-10 15:15 UTC by Murray Cumming
Modified: 2008-03-11 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gmarkup_test.c (847 bytes, text/plain)
2008-03-10 15:15 UTC, Murray Cumming
  Details
gmarkup_utf8_error.patch (1.31 KB, patch)
2008-03-11 14:31 UTC, Murray Cumming
accepted-commit_now Details | Review

Description Murray Cumming 2008-03-10 15:15:16 UTC
When GMarkup parses invalid UTF8, it puts this invalid UTF8 directly into the GError message, meaning that the GError message is no longer a "human-readable informative error message".

I guess that some conversion should be done first. Would g_convert_with_fallback() be the best way to do this?
Comment 1 Murray Cumming 2008-03-10 15:15:57 UTC
Created attachment 106975 [details]
gmarkup_test.c

A test case to show the problem.
Comment 2 Matthias Clasen 2008-03-10 16:19:55 UTC
Yeah, g_convert_with_fallback would be ok for this.
Comment 3 Murray Cumming 2008-03-11 14:31:50 UTC
Created attachment 107060 [details] [review]
gmarkup_utf8_error.patch

Permission to apply this? It fixes the test case.
Comment 4 Matthias Clasen 2008-03-11 15:39:11 UTC
Please apply, after adding a space before '('