Ticket #5253 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Test 3307 and "readFileAs fileSystemEncoding" fails on Windows

Reported by: igloo Owned by: batterseapower@…
Priority: normal Milestone:
Component: libraries/base Version: 7.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The "readFileAs fileSystemEncoding" part of test 3307 doesn't work on Windows:

$ make 3307-test
"C:/msys/1.0/home/ian/ghc/inplace/bin/ghc-stage2.exe" --make -fforce-recomp -v0 3307.hs -o 3307
echo Ni hao > chinese-file-小说
echo chinese-file-小说 > chinese-name
# The tests are run in a UTF-8 locale. We would test another one
# (like Big5) but GHC developers probably won't have it on their machines.
./3307 chinese-file-小说
Test 1
[99,104,105,110,101,115,101,45,102,105,108,101,45,23567,35828]
Ni hao
Test 2
[99,104,105,110,101,115,101,45,102,105,108,101,45,23567,35828]
Ni hao
Test 3
[99,104,105,110,101,115,101,45,102,105,108,101,45,23567,35828]
Ni hao
Test 4
[99,104,105,110,101,115,101,45,102,105,108,101,45,213,9617,197,222]
3307.exe: chinese-file-小� openFile: does not exist (No such file or directory)
make: *** [3307-test] Error 1

I don't know if this is a bug in the test or in the code, but I hope you will, Max!

Change History

Changed 2 years ago by igloo

Hmm, the sort of failure may depend on whether you're in a cygwin or msys shell.

Changed 2 years ago by malcolm.wallace@…

I have no idea whether the following observation is relevant here or not, but I recently discovered that in the Windows Command Shell (DOS box, also used by the default Cygwin shell), even if the locale is set to C.UTF8, there is something weird happening such that it believes it is in a different encoding (one of the 8-bit non-variable-length code pages). Changing the font (from Raster to e.g. Lucida Console) seems to encourage the shell to believe the C.UTF8 encoding setting more firmly. Alternative shells (such as MinTTY) are more consistent.

Changed 2 years ago by batterseapower

  • status changed from new to closed
  • resolution set to fixed

I think this is a test bug: fixed in 8076337ba5a797f8892be66de6a4d98c67783497 to the testsuite repo

Note: See TracTickets for help on using tickets.