This is taken from some test code I'm writing. The call to
pdf_text_new_from_unicode returns PDF_OK as, but path->data contains only
the first character of pathname. So I debugged this with the following
result.
Please, take into account that pdf_text_t is opaque, so you shouldn't
need to access path->data. Not sure what you mean with only first
character being stored in path->data anyway... The pdf_text_t object
stores the string in UTF-32HE, which in most cases is UTF-32LE. This
means that for an ASCII string, each byte is expanded into 4 bytes. For
example, in UTF-32LE you would get:
'A' -> 'A''/0''/0''/0'
'A''B' -> 'A''/0''/0''/0' 'B''/0''/0''/0'
Is this what you see? I mean, if you try to printf() path->data, of
course you will get only first character, as printf() will stop in the
first NUL byte. printf() can't be used with UTF-32.
-Aleksander