Changeset 5254


Ignore:
Timestamp:
Sep 24, 2006, 6:58:26 PM (18 years ago)
Author:
Gary Byers
Message:

Buffer translation functions don't belong here; start thinking about BOM.

File:
1 edited

Legend:

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

    r5247 r5254  
    8282  (literal-char-code-limit 0)
    8383
    84   ;; Function to translate all #\Return characters in a vector to #\Linefeed
    85   (translate-cr-to-lf-function 'u8-translate-cr-to-lf)
    86 
    87   ;; Function to translate all #\Linefeed characters in a vector to #\Return
    88   (translate-lf-to-cr-function 'u8-translate-lf-to-cr)
     84  ;; Does a byte-order-mark determine the endianness of input ?
     85  ;; Should we prepend a BOM to output ?
     86  ;; If non-nil, the value should be a cons:
     87  ;; (native-byte-order-encoding . swapped-byte-order-encoding)
     88  (use-byte-order-mark nil)
    8989  )
    9090
    91            
     91(defconstant byte-order-mark #\u+feff)
     92(defconstant byte-order-mark-char-code (char-code byte-order-mark))
     93(defconstant swapped-byte-order-mark #\u+fffe)
     94(defconstant swapped-byte-order-mark-char-code (char-code swapped-byte-order-mark))
     95
     96
    9297
    9398(defmethod print-object ((ce character-encoding) stream)
     
    15171522    :literal-char-code-limit #x10000
    15181523    )
     1524
     1525;;; UTF-16.
Note: See TracChangeset for help on using the changeset viewer.