meson: configure_file fails for files encoded with not utf-8 or ascii
I’m working on wrapping a project (freeglut), and one of the files in the project that need to be configured (using configure_file) is encoded in ISO-8859, and contains an character that isn’t compatible with utf-8. meson dies trying to configure said file.
Here’s the output:
Could not read input file /home/user/source/mesa-demos/subprojects/freeglut-3.0.0/freeglut.rc.in: 'utf-8' codec can't decode byte 0xa9 in position 740: invalid start byte
I don’t know if this is a case really worth solving (how many projects use encodings other than ascii or utf-8?). Since it’s just changing the encoding I’ve just copied the file into my wrap patch.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (17 by maintainers)
Commits related to this issue
- configure_file: Add a new action 'copy' This will copy the file to the build directory without trying to read it or substitute values into it. Also do this optimization if the configuration_data() o... — committed to mesonbuild/meson by nirbheek 6 years ago
- configure_file: Add a new action 'copy' This will copy the file to the build directory without trying to read it or substitute values into it. Also do this optimization if the configuration_data() o... — committed to mesonbuild/meson by nirbheek 6 years ago
- configure_file: Add a new action 'copy' This will copy the file to the build directory without trying to read it or substitute values into it. Also do this optimization if the configuration_data() o... — committed to mesonbuild/meson by nirbheek 6 years ago
- configure_file: Add a new action 'copy' This will copy the file to the build directory without trying to read it or substitute values into it. Also do this optimization if the configuration_data() o... — committed to mesonbuild/meson by nirbheek 6 years ago
I think #3383 closed this by accident
Fact of life is that you can’t change the world, you have to change your program. I added encoding keyword, a test and updated docs in #3135. Hopefully this is acceptable for the meson devs.