Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
237aabf4
Commit
237aabf4
authored
Feb 28, 2009
by
Jason Rumney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(detect_coding_charset): Fix last change for non-latin charsets.
parent
449148b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/coding.c
src/coding.c
+7
-6
No files found.
src/coding.c
View file @
237aabf4
...
@@ -5102,12 +5102,12 @@ detect_coding_charset (coding, detect_info)
...
@@ -5102,12 +5102,12 @@ detect_coding_charset (coding, detect_info)
attrs = CODING_ID_ATTRS (coding->id);
attrs = CODING_ID_ATTRS (coding->id);
valids = AREF (attrs, coding_attr_charset_valids);
valids = AREF (attrs, coding_attr_charset_valids);
name = CODING_ID_NAME (coding->id);
name = CODING_ID_NAME (coding->id);
if (VECTORP (Vlatin_extra_code_table)
if (strncmp ((char *) SDATA (SYMBOL_NAME (name)),
&& (strncmp ((char *) SDATA (SYMBOL_NAME (name)),
"iso-8859-", sizeof ("iso-8859-") - 1) == 0
"iso-8859-", sizeof ("iso-8859-") - 1) == 0
|| strncmp ((char *) SDATA (SYMBOL_NAME (name)),
|| strncmp ((char *) SDATA (SYMBOL_NAME (name)),
"iso-latin-", sizeof ("iso-latin-") - 1) == 0)
"iso-latin-", sizeof ("iso-latin-") - 1) == 0))
check_latin_extra = 1;
check_latin_extra = 1;
if (! NILP (CODING_ATTR_ASCII_COMPAT (attrs)))
if (! NILP (CODING_ATTR_ASCII_COMPAT (attrs)))
src += head_ascii;
src += head_ascii;
...
@@ -5128,7 +5128,8 @@ detect_coding_charset (coding, detect_info)
...
@@ -5128,7 +5128,8 @@ detect_coding_charset (coding, detect_info)
if (c >= 0x80)
if (c >= 0x80)
{
{
if (c < 0xA0
if (c < 0xA0
&& (!check_latin_extra
&& check_latin_extra
&& (!VECTORP (Vlatin_extra_code_table)
|| NILP (XVECTOR (Vlatin_extra_code_table)->contents[c])))
|| NILP (XVECTOR (Vlatin_extra_code_table)->contents[c])))
break;
break;
found = CATEGORY_MASK_CHARSET;
found = CATEGORY_MASK_CHARSET;
...
...
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