From 9b72ca60e8c0ada4256ee22f3ed5b45717ccc368 Mon Sep 17 00:00:00 2001 From: Scarlett Clark Date: Wed, 22 Jun 2016 09:07:44 -0700 Subject: Fix reproducibility in builds by ensuring utf-8 encoding. REVIEW:128102 Set encoding on kconfig_compiler generated cpp and headers to utf-8 ( reproducible builds ) Under certain locals non standard characters will get dropped making builds un reproducible. Setting the encoding to utf-8 on the files makes all builds reproducible no matter what ( or none ) locale is in use. Thereby making the build reproducible. --- src/kconfig_compiler/kconfig_compiler.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/kconfig_compiler/kconfig_compiler.cpp') diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp index ea68fec6..8bcaaf35 100644 --- a/src/kconfig_compiler/kconfig_compiler.cpp +++ b/src/kconfig_compiler/kconfig_compiler.cpp @@ -1755,6 +1755,8 @@ int main(int argc, char **argv) QTextStream h(&header); + h.setCodec("utf-8"); + h << "// This file is generated by kconfig_compiler_kf5 from " << QFileInfo(inputFilename).fileName() << "." << endl; h << "// All changes you do to this file will be lost." << endl; @@ -2216,6 +2218,8 @@ int main(int argc, char **argv) QTextStream cpp(&implementation); + cpp.setCodec("utf-8"); + cpp << "// This file is generated by kconfig_compiler_kf5 from " << QFileInfo(inputFilename).fileName() << "." << endl; cpp << "// All changes you do to this file will be lost." << endl << endl; -- cgit v1.2.1