Fix test bug with utf-8 encoding