Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 NOT WORKING #5

Open
deshario opened this issue May 28, 2019 · 3 comments
Open

UTF-8 NOT WORKING #5

deshario opened this issue May 28, 2019 · 3 comments

Comments

@deshario
Copy link

Seems like UTF-8 (thai characters) not working well .. Is there anything missing from me

image

@killianhuyghe
Copy link

I had the same issue with diacritics on latin letters (é, à, ...).

FYI, the bug is not present in the repo it has been forked from, so you might as well do without the stream part until this is fixed.

@jasonphillips
Copy link
Owner

FYI, the bug is not present in the repo it has been forked from, so you might as well do without the stream part until this is fixed.

Hmm, I've never been able to resolve this, but partly because I do get the same problem when using the latest (0.0.11) version of the forked library.

Keeping strictly to their main simple example from the docs, and using some characters like (é, or text like मुख्यपृष्ठम्) those fields are either garbled or fail to write. Also, when I have attempted to use the underlying binary pdftk directly, I still run into errors at the moment. Would happily accept a PR or focused test that can target the problem more precisely.

@drnjha
Copy link

drnjha commented Jul 6, 2023

In fdf.js I made the following modification to make UTF-8 work:

var header = Buffer.concat([
    Buffer.from("%FDF-1.2\n"),
    headerChars,
    Buffer.from(
        "1 0 obj \n" +
        "<<\n" +
        "/Version /1.3 \n" +     // neu wg. Umlauten
        "/Encoding /utf_8 \n" +  // neu wg. Umlauten
        "/FDF \n" +
        "<<\n" +
        "/Fields [\n"
    )
]);

I hope it makes sense to s.o.
:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants