From: Kenichi Handa Date: Wed, 8 Sep 2010 02:21:03 +0000 (+0900) Subject: coding.c (encode_coding_iso_2022): Do not optimize for ASCII if we may use designatio... X-Git-Tag: emacs-pretest-23.2.90~133 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a552b35afa83816d3a4bfaa32be91c196a68e41b;p=emacs.git coding.c (encode_coding_iso_2022): Do not optimize for ASCII if we may use designation or locking-shift. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3dda03c963f..f46e02b9193 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-09-08 Kenichi Handa + + * coding.c (encode_coding_iso_2022): Don't optimize for ASCII if + we may use designation or locking-shift. + 2010-09-07 Kenichi Handa * coding.c (detect_coding_emacs_mule): Fix checking of multibyte diff --git a/src/coding.c b/src/coding.c index d62998f4c8b..92b328091ff 100644 --- a/src/coding.c +++ b/src/coding.c @@ -4528,7 +4528,10 @@ encode_coding_iso_2022 (coding) charset_list = CODING_ATTR_CHARSET_LIST (attrs); coding->safe_charsets = SDATA (CODING_ATTR_SAFE_CHARSETS (attrs)); - ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs)); + ascii_compatible + = (! NILP (CODING_ATTR_ASCII_COMPAT (attrs)) + && ! (CODING_ISO_FLAGS (coding) & (CODING_ISO_FLAG_DESIGNATION + | CODING_ISO_FLAG_LOCKING_SHIFT))); while (charbuf < charbuf_end) {