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

Add a note about locales #194

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions doc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,16 @@ table, tr, td, th, tbody, thead, tfoot {
###### *Q*: My chars with accents in HTML document are not correctly rendered.

*A*: Make sure that you have set `<meta charset="UTF-8" />`

###### *Q*: My chars with accents passed to wkhtmltopdf options are not correctly rendered, i.e. `footer-right => 'Página [page] de [toPage]'` is converted to 'Página 1 de 1'.

*A*: The answer is long here. We use `escapeshellarg` (and Symfony/Process as well) function to escape all the option value passed to `wkhtmltox`. `escapeshellarg` makes its escape based on server locale, so if you are experiencing this issue - you can set
```php
setlocale(LC_CTYPE, 'es_ES.UTF-8')
```

or any locale which is suitable for you. You should take into account that if given locale is not configured on the server - you will still have an issue. Check your locales installed via running
```bash
locale -a
```
If the needed locale is missing on the server - you should install/configure it.