Bugs: Browse | Submit New | Admin
Attempting to add the following ISBN: 0 19 861131 5 results in: found at DeaStore (Italy) /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/alexandria/book_providers/bol_it.rb: line 88 Subsequently editing the entry (e.g., to remove the bad characters) reproducibly triggers the error message in the summary. This is alexandria 0.6.2 on Debian etch, installed from the .deb on rubyforge (as an upgrade from the 0.6.1 package that ships in Debian).
Add A Comment:
Date: 2009-03-05 00:27 Sender: Cathal Mc Ginley I had problems with DeaStore and character encodings when I re-wrote the provider. I did manage to fix them for italian books... Unfortunately, the current version doesn't look up non-italian books from DeaStore itself. I will try to add that back before 0.6.4 and test that the UTF-8 problems are fixed. I agree with Sergio that checking inputs is certainly a weakness with Alexandria right now, but I'm working on it with the new providers. I think consistently converting and storing data as UTF-8 is the way to go.
Date: 2008-01-30 12:18 Sender: Lennart Karssen I copied the attached yaml file to ~/.alexandria/Main Library and indeed the ? appears in fron of the name. Double clicking the item and trying to remove the ? consistently leads to a crash even before the change in author can be saved by pressing enter. These are the errors (by the way, I removed the unicode entries I added in the previous message): alexandria --debug Can't load mechanize, hence provider Deastore not available Can't load Ruby/ZOOM, hence Z39.50 and providers Library of Congress, British Library not available /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 GLib-CRITICAL **:g_utf8_casefold: assertion `str != NULL' failed /usr/lib/ruby/1.8/alexandria/ui.rb:47: [BUG] Segmentation fault ruby 1.8.6 (2007-06-07) [i486-linux] Aborted (core dumped)
Date: 2008-01-30 12:10 Sender: Lennart Karssen Using the Gnome character map I tried to insert a non-breaking space and some other control characters into the title, author and publisher of a book (manual add) and indeed got pango_laout_set_text() errors: /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() /usr/lib/ruby/1.8/gettext.rb: line 154 Pango-WARNING **:Invalid UTF-8 string passed to pango_layout_set_text() However Alexandria did not crash. Neither when adding the book, nor when editing it. After shutting down Alexandria and restarting it, the library was loaded without problems (except for the error message mentioned above). I am using Alexandria 0.6.2 on Ubuntu 7.10.
Date: 2008-01-07 19:03 Sender: Sergio Gelato Yes, this seems to be specific to the data returned by DeaStore; if I have either Amazon or Worldcat ahead in the search order I get a valid record that doesn't trigger any obvious misbehaviour. The DeaStore response doesn't name J.B. Sykes (it ought to) but rather one "?Seidl, Jennifer", where the question mark stands for an invalid UTF-8 character (actually an ISO 8859-1 non-breaking space; I'm attaching the query result from DeaStore). It is when I try to delete that question mark that alexandria crashes. Leaving aside the quality of the data returned by DeaStore (and a few other providers), I'd say that alexandria needs to get better at coping with malformed network inputs, and especially invalid UTF-8.
Date: 2008-01-07 18:21 Sender: Lennart Karssen Thanks for the bug report. I've tried to add the ISBN to a library using Alexandria 0.6.2 and it worked without problem. The Concise Oxford Dictionary of Current English by J.B. Sykes was added. The book was found by the Amazon provider. I noticed that you have the mechanize installed, since the DeaStore provider was used. Could you try moving the amazon provider higher in the list (Edit -> Preferences -> Providers) and see if the problem persists.