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

Encoding bug #2113

Closed
NicolasFR opened this issue Apr 1, 2024 · 4 comments
Closed

Encoding bug #2113

NicolasFR opened this issue Apr 1, 2024 · 4 comments

Comments

@NicolasFR
Copy link

Hello,

I have a problem encoding accented letters on alpine that I don't encounter on Ubuntu.
However, if I force the encoding to UTF-8, I have no more problems.

Do you have an idea about how to approach this issue ?

@liZe
Copy link
Member

liZe commented Apr 2, 2024

Hi!

Default encoding for web documents is Latin-1, not UTF-8. When you render a document from the web, HTTP gives WeasyPrint hints about the encoding, so it’ll work even if it’s UTF-8. But if you render a document from the disk, there’s no HTTP hint, it’ll use the default Latin-1 encoding.

If you want to force WeasyPrint to use UTF-8, then use the --encoding parameter, or set a charset meta tag in your HTML file.

@liZe
Copy link
Member

liZe commented Apr 9, 2024

Is there anything more we can do for you?

@grewn0uille
Copy link
Member

Feel free to reopen if needed.

@grewn0uille grewn0uille closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
@NicolasFR
Copy link
Author

Thank you for your reply, which really helped me with my troubleshooting session.
No need to reopen it.

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

3 participants