X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffd-stream.lisp;h=37a8a442da3ee4f3d3bcd3dd01e95d4fd3c4b69b;hb=8d490a4d6b9d7f156cf503826b3e3195e6f3ad39;hp=4a4a17aa5735c63d09300236207952966e48e287;hpb=35697e2c02e7b29f7953ae318d50305561927a16;p=sbcl.git diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 4a4a17a..37a8a44 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -1348,11 +1348,16 @@ (function c-string int)) sb!unix:codeset) "LATIN-1") - "KEYWORD"))) - (dolist (entry *external-formats* - (setf (fd-stream-external-format fd-stream) :latin-1)) - (when (member (fd-stream-external-format fd-stream) (first entry)) - (return))) + "KEYWORD")) + (dolist (entry *external-formats* + (restart-case + (error "Invalid external-format ~A" + (fd-stream-external-format fd-stream)) + (use-default () + :report "Set external format to LATIN-1" + (setf (fd-stream-external-format fd-stream) :latin-1)))) + (when (member (fd-stream-external-format fd-stream) (first entry)) + (return)))) (when input-p (multiple-value-bind (routine type size read-n-characters