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

Use the C locale to portably parse the PDF header #15

Closed
aklomp opened this issue Aug 17, 2023 · 0 comments
Closed

Use the C locale to portably parse the PDF header #15

aklomp opened this issue Aug 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@aklomp
Copy link
Owner

aklomp commented Aug 17, 2023

On a machine where the locale is set to something not equivalent to ASCII, the call to awk in get_pdf_version() will throw the following error:

awk: cmd. line:1: (FILENAME=- FNR=1) warning: Invalid multibyte data detected. There may be a mismatch between your data and your locale. 

This can be fixed by forcing the C locale by prepending the call to awk with LC_ALL=C.

Reported and fixed by Laurent MUGNIER.

@aklomp aklomp added the bug Something isn't working label Aug 17, 2023
@aklomp aklomp self-assigned this Aug 17, 2023
aklomp added a commit that referenced this issue Aug 17, 2023
On a machine where the locale is set to something not equivalent to
ASCII, the call to `awk' in `get_pdf_version()' will throw the following
error:

  awk: cmd. line:1: (FILENAME=- FNR=1) warning: Invalid multibyte data
  detected. There may be a mismatch between your data and your locale.

This can be fixed by forcing the C locale by prepending the call to awk
with `LC_ALL=C'.

Reported and fixed by Laurent MUGNIER.
@aklomp aklomp closed this as completed in e0c237a Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant