commercialhaskell/stack

Default html charset for `stack test --coverage` reports on windows should not be cp437

Offen

#3.414 geöffnet am 04.09.2017

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Haskell (848 Forks)batch import
awaiting pull requestcomponent: Windowshelp wantedtype: bug

Repository-Metriken

Stars
 (4.060 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 17T 10h) (6 gemergte PRs in 30 T)

Beschreibung

The charset of of html files produced by stack test --coverage depends on the OS/locale. E.g. on Ubuntu 16 all files will be marked with charset=UTF-8, while on a Win10 machine they will be charset=CP437 (which mangles any character outside this charset; editing manually the charset to utf8 fixes the problem). I did not find any settings that would override the charset/provide custom css/etc.

Steps to reproduce

  1. Take any project with a non-empty test suite
  2. Cover in that test suite a file with non-ascii characters inside
  3. Use Win10
  4. Run stack test --coverage
  5. Open the produced html report for that file
  6. The charset would be set to CP437, making non-ascii part of the source code non-readable

Expected

A setting in a config file/cli option that would put the charset of my choice; or at least charset=UTF-8 everywhere regardless of the OS.

Actual

charset=CP437 where there is no reason to put this charset

Stack version

1.5.1 (latest after stack upgrade); OS=Win10

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository

Contributor Guide