summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2006-05-18 02:20:39 +0000
committerKenichi Handa <handa@m17n.org>2006-05-18 02:20:39 +0000
commit8acb7dad7a13f83bec14cb2c6cbe729ece5271ef (patch)
tree58ab2af69364ab49ac1e7d5a96dbbdd98efb1f05
parent0c2660c849293d23296f758c4a50f6e40432cf2e (diff)
downloademacs-8acb7dad7a13f83bec14cb2c6cbe729ece5271ef.tar.gz
(Fcall_process): Reject encoding arguments by
ascii-incompatible coding systems (e.g. utf-16).
-rw-r--r--src/ChangeLog12
-rw-r--r--src/callproc.c2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dd8feb509b1..3c527e22dd8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
+2006-05-18 Kenichi Handa <handa@m17n.org>
+
+ * callproc.c (Fcall_process): Reject encoding arguments by
+ ascii-incompatible coding systems (e.g. utf-16).
+
+ * coding.c (Qascii_incompatible): New variable.
+ (syms_of_coding): Setup Qascii_incompatible.
+ (setup_coding_system): Be sure to initialize coding->common_flags.
+ Check `ascii-incompatible' property of the coding system.
+
+ * coding.h (CODING_ASCII_INCOMPATIBLE_MASK): New macro.
+
2006-05-18 Kim F. Storm <storm@cua.dk>
* xdisp.c (display_tool_bar_line): Restore entire tool-bar geometry when
diff --git a/src/callproc.c b/src/callproc.c
index 8cf261c646f..f23996253f1 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -295,6 +295,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
val = Qnil;
}
setup_coding_system (Fcheck_coding_system (val), &argument_coding);
+ if (argument_coding.common_flags & CODING_ASCII_INCOMPATIBLE_MASK)
+ setup_coding_system (Qraw_text, &argument_coding);
if (argument_coding.eol_type == CODING_EOL_UNDECIDED)
argument_coding.eol_type = system_eol_type;
}