Incorrect handling of non-ascii output

Create issue
Issue #85 resolved
fwolff created an issue

Some of my tests fail and writes non-ascii output. At that point py.test fails with an internal error, failing in _plugin/ when str() is called on the non-ascii data.

Comments (5)

  1. fwolff reporter

    Ok, because of other failures I didn't see a remaining issue with my patch. I now changed it, and also add an XML header to specify the UTF-8 encoding which is hopefully a bit safer. I'm not sure if the unicode() calls are necessary at all, but it seems to work ok here.

  2. Holger Krekel repo owner
    • changed status to open

    thanks for the patch and the heads up. three things

    • can you factor out the repetitve code to a 'toutf8()' helper?
    • can you check that your code runs both on python2 and python3?
    • can you add a test in testing/plugin/ exercising the new function and/or a functional test?

    cheers & thanks, holger

  3. Holger Krekel repo owner

    do you think you can rework the patch in the next couple of days along my previous remarks? i plan a new release soon and would like to include your changes. thanks & best, holger

  4. Log in to comment