viewer: handle WinAnsiEncoding and MacRomanEncoding