Changeset 5193


Ignore:
Timestamp:
Sep 11, 2006, 7:10:41 PM (18 years ago)
Author:
Gary Byers
Message:

Character encodings contain a LITERAL-CHAR-CODE-LIMIT field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-unicode.lisp

    r5172 r5193  
    7474  ;; Might return NIL if the encoding's bogus
    7575  length-of-memory-encoding-function    ;(POINTER NUNITS &optional (START 0))
     76
     77  ;; Code units and character codes less than this value map to themselves
     78  (literal-char-code-limit 0)
    7679  )
    7780
     
    8689    (setf (get-character-encoding ,name)
    8790     (make-character-encoding :name ,name  ,@args))))
     91
     92(defun encoding-name (encoding)
     93  (character-encoding-name (or encoding (get-character-encoding nil))))
    8894
    8995;;; ISO-8859-1 is trivial, though of course it can't really encode characters
     
    164170     (declare (ignore pointer start))
    165171     nunits))
     172  :literal-char-code-limit 256
    166173  )
    167174
     
    169176(setf (get-character-encoding nil)
    170177      (get-character-encoding :iso-8859-1))
     178
     179
    171180
    172181
     
    572581                       ((< code #xe0) 2)
    573582                       ((< code #xf0) 3)
    574                        (t 4))))))))
     583                       (t 4)))))))
     584    :literal-char-code-limit #x80
     585    )
     586
Note: See TracChangeset for help on using the changeset viewer.