mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 22:01:36 -08:00
The functions LOAD-ENCODING and MAKE-ENCODING are no-ops or signal errors when --disable-unicode was used
This commit is contained in:
parent
4d1a14fe44
commit
3fdd435f28
1 changed files with 7 additions and 0 deletions
|
|
@ -294,11 +294,15 @@ the one used internally by ECL compiled files."
|
|||
(or all-encodings
|
||||
(progn
|
||||
(setf all-encodings basic-encodings)
|
||||
#+unicode
|
||||
(dolist (i (directory "sys:encodings;*"))
|
||||
(push (intern (pathname-name i) "KEYWORD") all-encodings))
|
||||
all-encodings))))
|
||||
|
||||
(defun ext:load-encoding (name)
|
||||
#-unicode
|
||||
(warn "EXT:LOAD-ENCODING not available when ECL is built without support for Unicode")
|
||||
#+unicode
|
||||
(let ((filename (make-pathname :name (symbol-name name) :defaults "sys:encodings;")))
|
||||
(cond ((probe-file filename)
|
||||
(load filename :verbose nil)
|
||||
|
|
@ -314,6 +318,9 @@ the one used internally by ECL compiled files."
|
|||
(error "Unable to find mapping file ~A for encoding ~A" filename name)))))
|
||||
|
||||
(defun ext:make-encoding (mapping)
|
||||
#-unicode
|
||||
(error "Not a valid external format ~A" mapping)
|
||||
#+unicode
|
||||
(cond
|
||||
((symbolp mapping)
|
||||
(let ((var (intern (symbol-name mapping) (find-package "EXT"))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue