Raymond Toy pushed to branch issue-139-set-terminal-to-utf8 at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/save.lisp
    ... ... @@ -152,13 +152,15 @@
    152 152
     	   (setf (gethash :locale stream::*external-format-aliases*)
    
    153 153
     		 *default-external-format*))
    
    154 154
     	  (t
    
    155
    -	   (let ((codeset-format (intern codeset "KEYWORD")))
    
    156
    -	     ;; If we know the format, we can set the alias.
    
    157
    -	     ;; Otherwise, print a warning and use :iso8859-1 as the
    
    155
    +	     ;; If we know the format.  This could be an alias to
    
    156
    +	     ;; another format and so on, so use FIND-EXTERNAL-FORMAT
    
    157
    +	     ;; to determine the final format and use that as the
    
    158 158
     	     ;; alias.
    
    159
    +	   (let* ((codeset-format (intern codeset "KEYWORD"))
    
    160
    +		  (final-format (stream::find-external-format codeset-format)))
    
    159 161
     	     (setf (gethash :locale stream::*external-format-aliases*)
    
    160
    -		   (if (stream::find-external-format codeset-format nil)
    
    161
    -		       codeset-format
    
    162
    +		   (if final-format
    
    163
    +		       (stream::ef-name final-format)
    
    162 164
     		       (progn
    
    163 165
     			 (warn "Unsupported external format; using :iso8859-1 instead: ~S"
    
    164 166
     			       codeset-format)