TST: fix test to rely on display.encoding rather then utf8, GH2666
Merge pull request #2677 from y-p/GH2666

TST: fix test to rely on display.encoding rather then utf8, GH2666