Fix utf8 encoding issue for terminal