Skip to content

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

@CherryDT

Description

@CherryDT

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions