Commit 9c6d2887 authored by Kenichi Handa's avatar Kenichi Handa

(detect_coding_utf_16): Fix the logic of rejecting

UTF-16 by checking the dispersion of Eth and Oth bytes.
parent c8e98fdb
......@@ -1677,14 +1677,14 @@ detect_coding_utf_16 (coding, detect_info)
{
e[c1] = 1;
e_num++;
if (e_num >= 128)
if (e_num >= 128 && o_num >= 128)
break;
}
if (! o[c2])
{
o[c2] = 1;
o_num++;
if (o_num >= 128)
if (e_num >= 128 && o_num >= 128)
break;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment