X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fi18n.lisp;h=78c04990beced25a3b2542bebdcba0b4c12d6f7b;hb=2bb9a36070147d6c21e4a99d699ec3563c021a70;hp=e2d204a33a4eb752220aff41a98f382464bfba01;hpb=f14760717eb60ac01bb854986d9e4ba9eacdf8bc;p=uffi.git diff --git a/src/i18n.lisp b/src/i18n.lisp index e2d204a..78c0499 100644 --- a/src/i18n.lisp +++ b/src/i18n.lisp @@ -16,15 +16,15 @@ #-(or (and lispworks unicode) (and sbcl sb-unicode) (and allegro ics) (and clisp i18n) (and openmcl openmcl-unicode-strings)) -(pushnew 'no-i18n *features*) +(pushnew 'no-i18n cl:*features*) -(defvar *default-external-character-encoding* +(defvar *default-foreign-encoding* nil - "Normalized name of default external character encoding to use + "Normalized name of default external character format to use for foreign string conversions. nil means use implementation default encoding.") -(defvar *external-encoding-mapping* +(defvar *foreign-encoding-mapping* #+(and lispworks unicode) '((:ascii . :ascii) (:latin-1 . :latin-1) (:ucs-2 . :unicode) (:utf-8 . :utf-8) (:jis . :jis) (:sjis . :sjis) (:gbk . :gbk)) @@ -42,16 +42,18 @@ encoding.") (:gbk . charset:gbk) (:euc-jp . charset:euc-jp)) #+(and openmcl openmcl-unicode-strings) '((:ascii . :ascii) (:latin-1 . :iso-8859-1) (:utf-8 . :utf-8) - (:ucs-2 . :ucs-2) (:euc-jp . :euc-jp)) + (:ucs-2 . :ucs-2) + #+nil (:euc-jp . :euc-jp) + ) #-(or (and lispworks unicode) (and sbcl sb-unicode) (and allegro ics) (and clisp unicode) (and openmcl openmcl-unicode-strings)) nil - "Mapping between normalized external encoding name and implementation name.") + "Mapping between normalized external format name and implementation name.") -(defvar *external-character-encodings* - (mapcar 'car *external-encoding-mapping*) - "List of normalized names of external encodings support by underlying implementation.") +(defvar *foreign-encodings* + (mapcar 'car *foreign-encoding-mapping*) + "List of normalized names of external formats support by underlying implementation.") -(defun map-normalized-external-encoding (normalized) - (cdr (assoc normalized *external-encoding-mapping* :test 'eql))) +(defun implementation-foreign-encoding (normalized) + (cdr (assoc normalized *foreign-encoding-mapping* :test 'eql)))