You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/04/15 17:40:22 UTC

[jira] [Comment Edited] (PDFBOX-283) Character encoding/appearance issues when filling forms

    [ https://issues.apache.org/jira/browse/PDFBOX-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13969632#comment-13969632 ] 

Tilman Hausherr edited comment on PDFBOX-283 at 4/15/14 3:39 PM:
-----------------------------------------------------------------

I committed Maruans fix in rev 1587617 for the 1.8 branch and rev 1587616 for the trunk. (Sorry, forgot to add your name in the commit).


was (Author: tilman):
I committed Maruans fix in rev 1587617 for the 1.8 branch and rev 1587616 for the trunk. (Sorry, forgot your name).

> Character encoding/appearance issues when filling forms
> -------------------------------------------------------
>
>                 Key: PDFBOX-283
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-283
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>         Attachments: PDAppearance.patch
>
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1735902
> Originally submitted by scop on 2007-06-12 10:23.
> When filling a text field with non-ASCII characters such as in my surname "Skyttä" and saving the document in a UTF-8 environment, something goes wrong with the appearance of the text.
> The value itself seems to be stored correctly, but when opening the doc, the appearance of "ä" is not that, but rather something which happens when UTF-8 is mistakenly treated as ISO-8859-1 (two garbage characters).
> PDAppearance uses the platform default encoding in quite a few places which apparently has potential to mess things up.  In particular, insertGeneratedAppearance() generates a PrintWriter from an OutputStream without specifying the encoding.  In fact, if I hack that to use ISO-8859-1, the appearance of my "ä" case is correct, but that won't obviously work with anything else than chars that are valid ISO-8859-1.
> In which char encoding should the value be written to the appearance stream (at end of insertGeneratedAppearance())?



--
This message was sent by Atlassian JIRA
(v6.2#6252)