[poppler] patch: Use error() instead of fprintf(stderr, ...) in Annot::layoutText
Albert Astals Cid
aacid at kde.org
Thu May 10 13:35:46 PDT 2012
El Dimecres, 9 de maig de 2012, a les 19:31:28, Fabio D'Urso va escriure:
> Currently, Annot::layoutText outputs a warning to stderr when it doesn't
> know how to print a Unicode character, bypassing centralized error()
> handling.
>
> Patch 0001 fixes it, but with this patch only, character codes cannot be
> printed in upper case any more (because GooString formatting doesn't
> implement uppercase digits):
> AnnotWidget::layoutText, cannot convert U+03c6
>
> With a quick search, it seems that the U+ convention is to always print
> uppercase hex digits.
>
> Patch 0002 (to be applied on top of patch 0001) adds support to output
> uppercase hexadecimal digits (adding a new 'X' suffix to GooString
> formatting routines) and patches Annot::layoutText again to use the new
> suffix. This is the final output:
> AnnotWidget::layoutText, cannot convert U+03C6
>
> To trigger the warning: pick any document with forms and add unusual
> characters (eg www.irs.gov/pub/irs-pdf/fw4.pdf and φ U+03C6)
Commited to master (i.e 0.22 only) since it changes the GooString code and
even if it is "trivial enough" it was too late for the 0.20.0 release and the
eventual printing of something in stderr is not that bad.
Cheers,
Albert
>
> Fabio
More information about the poppler
mailing list