diff tests/test-patch.t @ 37946:57b0c7221dba

encoding: fix toutf8b() to resurrect lossy characters even if "\xed" in it If 's' is a localstr, 's._utf8' must be returned to get the original UTF-8 sequence back. Because of this, it was totally wrong to test if '"\xed" not in s', which should be either '"\xed" not in s._utf8' or just omitted. This patch moves the localstr handling to top as the validity of 's._utf8' should be pre-checked by encoding.tolocal().
author Yuya Nishihara <yuya@tcha.org>
date Sun, 22 Apr 2018 11:38:53 +0900
parents 90c5ca718781
children 0b39edeff033 6cc5d01a58a6
line wrap: on
line diff