diff options
author | albert-github <albert.tests@gmail.com> | 2020-06-20 08:46:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-20 08:46:25 (GMT) |
commit | d5916c06fba9667911a19cf658e7c5ab54daf72c (patch) | |
tree | a05183434684580a1b91775152c8bc4d15823c22 /testing/runtests.py | |
parent | 699860c8cd7f145d294a59a9b8848a044bd69511 (diff) | |
download | Doxygen-d5916c06fba9667911a19cf658e7c5ab54daf72c.zip Doxygen-d5916c06fba9667911a19cf658e7c5ab54daf72c.tar.gz Doxygen-d5916c06fba9667911a19cf658e7c5ab54daf72c.tar.bz2 |
Problem with generating test output for Chinese (#7862)
* Problem with generating test output for Chinese
The log output generated for the Chinese language can contain some extended ASCII characters, this results in a message like:
```
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 36101: invalid continuation byte
```
and a crash of the test application during the read of the file.
In case of a crash it is attempted to open the file with another decoding and redo the read.
* Problem with generating test output for Chinese
It is not necessary to use the fallback, one can, in this case, directly use `encoding='ISO-8859-1'`
Diffstat (limited to 'testing/runtests.py')
-rwxr-xr-x | testing/runtests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/runtests.py b/testing/runtests.py index 5d5cee1..c7b7bc7 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -391,10 +391,10 @@ class Tester: elif (not outType and xopen(latex_output + "/temp",'r').read().find("Error")!= -1): msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",) failed_latex=True - elif xopen(latex_output + "/refman.log",'r').read().find("Error")!= -1: + elif xopen(latex_output + "/refman.log",'r',encoding='ISO-8859-1').read().find("Error")!= -1: msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",) failed_latex=True - elif xopen(latex_output + "/refman.log",'r').read().find("Emergency stop")!= -1: + elif xopen(latex_output + "/refman.log",'r',encoding='ISO-8859-1').read().find("Emergency stop")!= -1: msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",) failed_latex=True elif not self.args.keep: |