coverage assumes that sources are in utf8 when using python 2.x

Issue #162 duplicate
jcspray created an issue

In, there is a 3.x specific code path which uses tokenize.detect_encoding to learn the encoding of source files before loading them, but there is no equivalent for python 2.x.

This causes HTML coverage output to break when using non-utf8 sources with python 2.x. An easy way to reproduce this is to run coverage on something that imports python-dateutil, which has an ISO-8859 encoded file that includes non-ASCII packages.

Comments (1)

  1. Log in to comment