From 30ad5edb909b8639ffa91161bf6a95f156b49b97 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Sun, 15 Aug 2010 13:03:43 +0000 Subject: [PATCH] When decoding-error is T, use a question mark for non-unicode builds instead of the (invalid) Unicode replacement character. --- code/fd-stream.lisp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/fd-stream.lisp b/code/fd-stream.lisp index 6c5a8a06d..62e48d76b 100644 --- a/code/fd-stream.lisp +++ b/code/fd-stream.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.116 2010/08/15 12:04:43 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/fd-stream.lisp,v 1.117 2010/08/15 13:03:43 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1848,11 +1848,18 @@ (d (cond ((characterp decoding-error) (constantly (char-code decoding-error))) ((eq t decoding-error) + #+unicode #'(lambda (&rest args) (apply 'cerror (intl:gettext "Use Unicode replacement character instead") args) - stream:+replacement-character-code+)) + stream:+replacement-character-code+) + #-unicode + #'(lambda (&rest args) + (apply 'cerror + (intl:gettext "Use question mark character instead") + args) + #\?)) (t decoding-error)))) (%make-fd-stream :fd fd -- GitLab