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
07295713
Commit
07295713
authored
Oct 21, 2008
by
Kenichi Handa
Browse files
(detect_coding_charset): For iso-8859-* coding systems,
check Vlatin_extra_code_table.
parent
30ee26a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
src/ChangeLog
src/ChangeLog
+5
-0
src/coding.c
src/coding.c
+13
-3
No files found.
src/ChangeLog
View file @
07295713
2008-10-21 Kenichi Handa <handa@m17n.org>
* coding.c (detect_coding_charset): For iso-8859-* coding systems,
check Vlatin_extra_code_table.
2008-10-20 Eli Zaretskii <eliz@gnu.org>
* fileio.c (Fset_file_modes): Doc fix.
...
...
src/coding.c
View file @
07295713
...
...
@@ -4975,16 +4975,20 @@ detect_coding_charset (coding, detect_info)
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
int consumed_chars = 0;
Lisp_Object attrs, valids;
Lisp_Object attrs, valids
, name
;
int found = 0;
int head_ascii = coding->head_ascii;
int check_latin_extra = 0;
detect_info->checked |= CATEGORY_MASK_CHARSET;
coding = &coding_categories[coding_category_charset];
attrs = CODING_ID_ATTRS (coding->id);
valids = AREF (attrs, coding_attr_charset_valids);
name = CODING_ID_NAME (coding->id);
if (VECTORP (Vlatin_extra_code_table)
&& strcmp ((char *) SDATA (SYMBOL_NAME (name)), "iso-8859-"))
check_latin_extra = 1;
if (! NILP (CODING_ATTR_ASCII_COMPAT (attrs)))
src += head_ascii;
...
...
@@ -5003,7 +5007,13 @@ detect_coding_charset (coding, detect_info)
if (NILP (val))
break;
if (c >= 0x80)
found = CATEGORY_MASK_CHARSET;
{
if (c < 0xA0
&& check_latin_extra
&& NILP (XVECTOR (Vlatin_extra_code_table)->contents[c]))
break;
found = CATEGORY_MASK_CHARSET;
}
if (INTEGERP (val))
{
charset = CHARSET_FROM_ID (XFASTINT (val));
...
...
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