On 14/04/2020 09:14, Stephan Bergmann wrote:
On 09/04/2020 17:21, Miklos Vajna wrote:
One option would be to tweak test_main.py to default to UTF-8, like
Linux does. You could try something like this:
if sys.platform.startswith("win"):
import _locale
_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])
Does not make a difference. Neither if I put this at the top of
uitest/test_main.py after all the imports, nor if I put it at the top of
the "if __name == '__main__':" block.
For the record, I locally got around the issue with a manual patch of
--- instdir/program/python-core-3.7.7/lib/unittest/runner.py
+++ instdir/program/python-core-3.7.7/lib/unittest/runner.py
@@ -114,7 +114,7 @@
self.stream.writeln(self.separator1)
self.stream.writeln("%s: %s" % (flavour,self.getDescription(test)))
self.stream.writeln(self.separator2)
- self.stream.writeln("%s" % err)
+ self.stream.writeln("%s" % err.encode('unicode_escape'))
class TextTestRunner(object):
for the moment (but which makes the UITest failure output hard to read,
of course).
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.