mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-22 21:50:45 -08:00
(detect_coding_utf_16): Fix the logic of rejecting
UTF-16 by checking the dispersion of Eth and Oth bytes.
This commit is contained in:
parent
c8e98fdb17
commit
9c6d2887cd
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue