[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113469: Fix Bug#8522.
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] trunk r113469: Fix Bug#8522. |
Date: |
Sat, 20 Jul 2013 11:53:39 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113469 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: K. Handa <address@hidden>
branch nick: trunk
timestamp: Sat 2013-07-20 20:53:32 +0900
message:
Fix Bug#8522.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/international/mule.el mule.el-20091113204419-o5vbwnq5f7feedwu-1046
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/coding.c coding.c-20091113204419-o5vbwnq5f7feedwu-1077
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-07-19 14:57:28 +0000
+++ b/lisp/ChangeLog 2013-07-20 11:51:53 +0000
@@ -1,3 +1,8 @@
+2013-07-20 Kenichi Handa <address@hidden>
+
+ * international/mule.el (coding-system-iso-2022-flags): Add
+ `8-bit-level-4'. (Bug#8522)
+
2013-07-19 Lars Magne Ingebrigtsen <address@hidden>
* net/shr.el (shr-mouse-browse-url): New command and keystroke
=== modified file 'lisp/international/mule.el'
--- a/lisp/international/mule.el 2013-07-13 10:55:21 +0000
+++ b/lisp/international/mule.el 2013-07-20 11:22:56 +0000
@@ -518,7 +518,8 @@
composition
euc-tw-shift
use-roman
- use-oldjis)
+ use-oldjis
+ level-4)
"List of symbols that control ISO-2022 encoder/decoder.
The value of the `:flags' attribute in the argument of the function
@@ -542,8 +543,9 @@
on decoding, and use locking-shift to invoke a graphic element on
encoding.
-If `single-shift' is specified, decode single-shift code correctly on
-decoding, and use single-shift to invoke a graphic element on encoding.
+If `single-shift' is specified, decode single-shift code
+correctly on decoding, and use single-shift to invoke a graphic
+element on encoding. See also `8-bit-level-4' specification.
If `designation' is specified, decode designation code correctly on
decoding, and use designation to designate a charset to a graphic
@@ -578,7 +580,13 @@
of ASCII.
If `use-oldjis' is specified, JIS0208-1976 is designated instead of
-JIS0208-1983.")
+JIS0208-1983.
+
+If `8-bit-level-4' is specified, the decoder assumes the
+implementation lavel \"4\" for 8-bit codes which means that GL is
+identified as the single-shift area. The default implementation
+level for 8-bit code is \"4A\" which means that GR is identified
+as the single-shift area.")
(defun define-coding-system (name docstring &rest props)
"Define NAME (a symbol) as a coding system with DOCSTRING and attributes.
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-07-20 08:25:46 +0000
+++ b/src/ChangeLog 2013-07-20 11:51:53 +0000
@@ -1,3 +1,8 @@
+2013-07-20 Kenichi Handa <address@hidden>
+
+ * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
+ (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
+
2013-07-20 Andreas Schwab <address@hidden>
* lread.c (Fload): Avoid uninitialized warning.
=== modified file 'src/coding.c'
--- a/src/coding.c 2013-07-19 16:15:51 +0000
+++ b/src/coding.c 2013-07-20 11:51:53 +0000
@@ -493,6 +493,8 @@
#define CODING_ISO_FLAG_USE_OLDJIS 0x10000
+#define CODING_ISO_FLAG_LEVEL_4 0x20000
+
#define CODING_ISO_FLAG_FULL_SUPPORT 0x100000
/* A character to be produced on output if encoding of the original
@@ -3772,7 +3774,10 @@
else
charset = CHARSET_FROM_ID (charset_id_2);
ONE_MORE_BYTE (c1);
- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0))
+ if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)
+ || (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS)
+ && ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4)
+ ? c1 >= 0x80 : c1 < 0x80)))
goto invalid_code;
break;
@@ -3786,7 +3791,10 @@
else
charset = CHARSET_FROM_ID (charset_id_3);
ONE_MORE_BYTE (c1);
- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0))
+ if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)
+ || (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS)
+ && ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4)
+ ? c1 >= 0x80 : c1 < 0x80)))
goto invalid_code;
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113469: Fix Bug#8522.,
Kenichi Handa <=