Mercurial > emacs
changeset 89404:3e1d187b52c3
(Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
(Qutf_16_le): Remove these variables.
(syms_of_coding): Don't DEFSYM them.
(decode_coding_utf_16): Fix handling of BOM.
(encode_coding_utf_16): Fix handling of BOM.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 28 Mar 2003 04:09:32 +0000 |
parents | e7eb0fa7dce7 |
children | 3293e7645d53 |
files | src/coding.c |
diffstat | 1 files changed, 5 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Fri Mar 28 04:06:53 2003 +0000 +++ b/src/coding.c Fri Mar 28 04:09:32 2003 +0000 @@ -308,7 +308,6 @@ Lisp_Object Qdefault_char; Lisp_Object Qno_conversion, Qundecided; Lisp_Object Qcharset, Qiso_2022, Qutf_8, Qutf_16, Qshift_jis, Qbig5; -Lisp_Object Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig, Qutf_16_le; Lisp_Object Qsignature, Qendian, Qbig, Qlittle; Lisp_Object Qcoding_system_history; Lisp_Object Qvalid_codes; @@ -1405,7 +1404,7 @@ if (bom == utf_16_with_bom) { if (endian == utf_16_big_endian - ? c != 0xFFFE : c != 0xFEFF) + ? c != 0xFEFF : c != 0xFFFE) { /* We are sure that there's enouph room at CHARBUF. */ *charbuf++ = c1; @@ -1415,10 +1414,10 @@ } else { - if (c == 0xFFFE) + if (c == 0xFEFF) CODING_UTF_16_ENDIAN (coding) = endian = utf_16_big_endian; - else if (c == 0xFEFF) + else if (c == 0xFFFE) CODING_UTF_16_ENDIAN (coding) = endian = utf_16_little_endian; else @@ -1505,9 +1504,9 @@ { ASSURE_DESTINATION (safe_room); if (big_endian) - EMIT_TWO_BYTES (0xFF, 0xFE); + EMIT_TWO_BYTES (0xFE, 0xFF); else - EMIT_TWO_BYTES (0xFE, 0xFF); + EMIT_TWO_BYTES (0xFF, 0xFE); CODING_UTF_16_BOM (coding) = utf_16_without_bom; } @@ -8413,10 +8412,6 @@ DEFSYM (Qutf_8, "utf-8"); DEFSYM (Qutf_16, "utf-16"); - DEFSYM (Qutf_16_be, "utf-16-be"); - DEFSYM (Qutf_16_be_nosig, "utf-16-be-nosig"); - DEFSYM (Qutf_16_le, "utf-16-l3"); - DEFSYM (Qutf_16_le_nosig, "utf-16-le-nosig"); DEFSYM (Qsignature, "signature"); DEFSYM (Qendian, "endian"); DEFSYM (Qbig, "big");