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

non-ASCII characters in directly passed header/footer not working unless LANG is set #141

Open
CherryDT opened this issue Sep 2, 2021 · 0 comments

Comments

@CherryDT
Copy link

CherryDT commented Sep 2, 2021

On Linux, passing for example footerCenter: 'abcäöüdef' won't work and will put abcdef into the footer unless the LANG environment variable is set.

I suggest that this library should spawn wkhtmltopdf with LANG=C.UTF-8 set.

My current workaround is:

wkhtmltopdf(input, {
  ...options,
  spawnOptions: { env: { LANG: 'C.UTF-8' } } // << THIS
})

(I discovered spawnOptions by looking at the source code, it's not documented.)

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

1 participant