Discussion:
[erlang-patches] (no subject)
Vlad Dumitrescu
2015-01-30 08:52:15 UTC
Permalink
OTP-11660: make eunit unicode safe

The most critical part is eunit_surefire, because the generated XML
must be correct UTF-8, otherwise tools will refuse to work with it.

The tricky part is that the input can contain mixed encodings and we
can't know which encoding applies to each text chunk. This is because
input can be from io:format in the tests. Also, different test modules
might be encoded differently and that can't be detected at runtime. We
have to avoid outputting both bad utf-8 and doubly encoded utf-8.

The simplest solution is to let the encoder skip characters it chokes
on, replacing them with '?'.
git fetch git://github.com/vladdu/otp.git eunit_unicode_OTP11660
https://github.com/vladdu/otp/compare/erlang
:master...eunit_unicode_OTP11660
https://github.com/vladdu/otp/compare/erlang
:master...eunit_unicode_OTP11660.patch
regards,
Vlad

Loading...