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

closes #2666