Add new encoding keyword for configure_file to manual

Also add a section how to deal with file encodings.
pull/3726/head
Sander Sweers 7 years ago committed by Nirbheek Chauhan
parent 47785bf89b
commit 38fa281448
  1. 8
      docs/markdown/Configuration.md
  2. 3
      docs/markdown/Reference-manual.md

@ -113,6 +113,14 @@ Will produce:
#define BAR
```
## Dealing with file encodings
The default meson file encoding to configure files is utf-8. If you need to
configure a file that is not utf-8 encoded the encoding keyword will allow
you to specify which file encoding to use. It is however strongly advised to
convert your non utf-8 file to utf-8 whenever possible. Supported file
encodings are those of python3, see [standard-encodings](https://docs.python.org/3/library/codecs.html#standard-encodings).
# A full example
Generating and using a configuration file requires the following steps:

@ -214,6 +214,9 @@ the `@variable@` syntax.
was specified. It defaults to `c`, in which case preprocessor directives
will be prefixed with `#`, you can also use `nasm`, in which case the
prefix will be `%`.
- `encoding` *(added v0.47.0)* set the file encoding for the input and output file,
defaults to utf-8. The supported encodings are those of python3, see
[standard-encodings](https://docs.python.org/3/library/codecs.html#standard-encodings).
### custom_target()

Loading…
Cancel
Save