Bug 223496 - [WinCairo] http/tests/mime/quoted-charset.py is failing since r273819
Summary: [WinCairo] http/tests/mime/quoted-charset.py is failing since r273819
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-18 19:20 PDT by Fujii Hironori
Modified: 2021-03-20 15:18 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2021-03-18 19:20:09 PDT
[WinCairo] http/tests/mime/quoted-charset.py is failing since r273819

  http/tests/mime/quoted-charset.py [ Failure ]
  http/tests/misc/bad-charset-alias.html [ Timeout ]
  http/tests/misc/url-in-utf16be.html [ Timeout ]
  http/tests/misc/url-in-utf16le.html [ Timeout ]
Comment 1 Fujii Hironori 2021-03-18 19:22:43 PDT
If I run the test on my Windows PC,

> python.exe ./Tools/Scripts/run-webkit-tests --debug --wincairo --no-new-test-results --no-retry-failures --no-show-results http/tests/mime/quoted-charset.py

WebKitBuild/Debug/bin64/layout-test-results/error_log.txt contains the following error message.

> AH01215: Traceback (most recent call last):\r: C:/home/webkit/gb/LayoutTests/http/tests/mime/quoted-charset.py
> AH01215:   File "C:\\home\\webkit\\gb\\LayoutTests\\http\\tests\\mime\\quoted-charset.py", line 7, in <module>\r: C:/home/webkit/gb/LayoutTests/http/tests/mime/quoted-charset.py
> AH01215:     print('''<p>Should say SUCCESS: {}</p>\r: C:/home/webkit/gb/LayoutTests/http/tests/mime/quoted-charset.py
> AH01215:   File "C:\\Python39\\lib\\encodings\\cp1252.py", line 19, in encode\r: C:/home/webkit/gb/LayoutTests/http/tests/mime/quoted-charset.py
> AH01215:     return codecs.charmap_encode(input,self.errors,encoding_table)[0]\r: C:/home/webkit/gb/LayoutTests/http/tests/mime/quoted-charset.py
> AH01215: UnicodeEncodeError: 'charmap' codec can't encode characters in position 25-27: character maps to <undefined>\r: C:/home/webkit/gb/LayoutTests/http/tests/mime/quoted-charset.py
Comment 2 Fujii Hironori 2021-03-18 19:23:54 PDT
https://docs.python.org/3/using/cmdline.html

> -X utf8 enables UTF-8 mode for operating system interfaces,
>  overriding the default locale-aware mode. -X utf8=0 explicitly
>  disables UTF-8 mode (even when it would otherwise activate
>  automatically). See PYTHONUTF8 for more details.

reg add HKEY_CLASSES_ROOT\.py\Shell\ExecCGI\Command /ve /d "c:\Python39\python.exe -X utf8"

This can solve the problems.
Comment 3 Stephan Szabo 2021-03-19 08:55:57 PDT
Thanks. I'm updating the running instances and will update the powershell module afterwards.