Last active
February 21, 2022 03:41
-
-
Save tcztzy/aff7c8ba21364181638d172844ab373d to your computer and use it in GitHub Desktop.
Meson build convert source code file encoding (Meson 转换源码编码 gb2312/gbk/cp1252/etc. to utf-8)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = import('fs') | |
executable('some_exe', | |
configure_file( | |
input: 'template.file', # file name should match | |
output: 'output.file', # whatever you want | |
configuration: { | |
'content': fs.read('input.file', encoding: 'cp1252'), # change the encoding you want, key `content` should match the template | |
} | |
), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@content@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment