fallback to latin-1 instead of escaping with \yHH

Fixes #155
This commit is contained in:
Jeremie Dimino 2016-02-01 08:55:17 +00:00
parent 9e41bf85da
commit b63e0f9225
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ let fix_string str =
let buf = Buffer.create (len + 128) in
if ofs > 0 then Buffer.add_substring buf str 0 ofs;
let rec loop ofs =
Printf.bprintf buf "\\y%02x" (Char.code (String.unsafe_get str ofs));
Zed_utf8.add buf (UChar.of_char str.[ofs]);
let ofs1 = ofs + 1 in
let ofs2, _, _ = Zed_utf8.next_error str ofs1 in
if ofs1 < ofs2 then