summaryrefslogtreecommitdiff
path: root/user/kcoreaddons/utf8.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-01-27 03:31:45 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-01-27 03:31:45 +0000
commitc76fbb6394b8371b7262660390c9c4098c1d5f0b (patch)
tree49bf80cde2c1ba2977ce729449fecda32c129500 /user/kcoreaddons/utf8.patch
parent2de0997503b0ac33cfc8a90a2fe90d18c48a97a0 (diff)
downloadpackages-c76fbb6394b8371b7262660390c9c4098c1d5f0b.tar.gz
packages-c76fbb6394b8371b7262660390c9c4098c1d5f0b.tar.bz2
packages-c76fbb6394b8371b7262660390c9c4098c1d5f0b.tar.xz
packages-c76fbb6394b8371b7262660390c9c4098c1d5f0b.zip
user/kcoreaddons: Use UTF-8 for parsing /etc/os-release
Diffstat (limited to 'user/kcoreaddons/utf8.patch')
-rw-r--r--user/kcoreaddons/utf8.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/user/kcoreaddons/utf8.patch b/user/kcoreaddons/utf8.patch
new file mode 100644
index 000000000..3fee25313
--- /dev/null
+++ b/user/kcoreaddons/utf8.patch
@@ -0,0 +1,17 @@
+Use UTF-8 for parsing /etc/os-release.
+
+diff --git a/src/lib/util/kosrelease.cpp b/src/lib/util/kosrelease.cpp
+index 0469aba..1d74f2a 100644
+--- a/src/lib/util/kosrelease.cpp
++++ b/src/lib/util/kosrelease.cpp
+@@ -134,9 +134,9 @@ public:
+ QStringList parts;
+ while (!file.atEnd()) {
+ // Trimmed to handle indented comment lines properly
+- line = QString::fromLatin1(file.readLine()).trimmed();
++ line = QString::fromUtf8(file.readLine()).trimmed();
+
+ if (line.startsWith(QLatin1Char('#'))) {
+ // Comment line
+ // Lines beginning with "#" shall be ignored as comments.
+ continue;