changeset 91967:39b7a7b122f8

(char-displayable-p): Fix for Latin-1 characters and terminal case.
author Kenichi Handa <handa@m17n.org>
date Wed, 20 Feb 2008 04:41:25 +0000
parents 0858a8d28e8d
children 28f7a9f11ad1
files lisp/international/mule-util.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-util.el	Wed Feb 20 04:39:21 2008 +0000
+++ b/lisp/international/mule-util.el	Wed Feb 20 04:41:25 2008 +0000
@@ -356,8 +356,8 @@
 appropriate font from the selected frame's fontset to display CHAR's
 charset in general.  Since fonts may be specified on a per-character
 basis, this may not be accurate."
-  (cond ((< char 256)
-	 ;; Single byte characters are always displayable.
+  (cond ((< char 128)
+	 ;; ASCII characters are always displayable.
 	 t)
 	((not enable-multibyte-characters)
 	 ;; Maybe there's a font for it, but we can't put it in the buffer.
@@ -368,7 +368,9 @@
 	 ;; currently selected frame.
 	 (car (internal-char-font nil char)))
 	(t
-	 (let ((coding 'iso-2022-7bit))
+	 ;; On a terminal, a character is displayable if the coding
+	 ;; system for the terminal can encode it.
+	 (let ((coding (terminal-coding-system)))
 	   (if coding
 	       (let ((cs-list (coding-system-get coding :charset-list)))
 		 (cond