]> git.lyx.org Git - features.git/commitdiff
tex2lyx tests: set the encoding when reading a file, not all OSes default to UTF-8
authorThibaut Cuvelier <tcuvelier@lyx.org>
Thu, 3 Mar 2022 00:57:16 +0000 (01:57 +0100)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Thu, 3 Mar 2022 00:57:28 +0000 (01:57 +0100)
src/tex2lyx/test/runtests.py

index 2ccaddcc46a1aed1659c6220fbbe330a56888984..103c74e307ea1efd9c42167a298f5bb694d30e7d 100755 (executable)
@@ -127,8 +127,8 @@ def main(argv):
                 else:
                     t1 = time.ctime(os.path.getmtime(lyxfile1))
                     t2 = time.ctime(os.path.getmtime(lyxfile2))
-                    f1 = open(lyxfile1, 'r')
-                    f2 = open(lyxfile2, 'r')
+                    f1 = open(lyxfile1, 'r', encoding="utf8")
+                    f2 = open(lyxfile2, 'r', encoding="utf8")
                     lines1 = f1.readlines()
                     i1 = 0
                     for linex in lines1: