Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9c6d2887
Commit
9c6d2887
authored
Jun 16, 2009
by
Kenichi Handa
Browse files
(detect_coding_utf_16): Fix the logic of rejecting
UTF-16 by checking the dispersion of Eth and Oth bytes.
parent
c8e98fdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/coding.c
src/coding.c
+2
-2
No files found.
src/coding.c
View file @
9c6d2887
...
...
@@ -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;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment