Re: G::O::I based bindings and problem passing char array ref



"Jeremy Volkening" <jdv base2bio com>:
I see that the data argument to "new_from_data()" is specified as a
utf-8 char array, but the contents of the PDF files (those that use
compressed blocks) are not actually straight UTF-8. Is it possible
that perl-G:I:O sees the specs and is forcing UTF-8 encoding on the
data at some point?

Yes.  If the argument is marked as being a utf8 string, then G:O:I will force the given string to be 
utf8-encoded before passing it on.

If I futz with the .gir and change the new_from_data() "data" parameter
type to a guint8 array (and then pass it a character array ref) I can
load and read the page number from most of the files that were
previously throwing errors. Then the script segfaults almost every
time...

Can you provide a backtrace and or Valgrind output?

# gdb --args perl program.pl
(gdb) run
...
(gdb) bt

# valgrind perl program.pl


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]