comparison lisp/unicode.el @ 3667:4c8ad140bcec

[xemacs-hg @ 2006-11-07 18:51:21 by aidan] Re-introduce ccl-encode-to-ucs-2, since it's still used by the JIT-UCS charsets. Thank you Ilya.
author aidan
date Tue, 07 Nov 2006 18:51:22 +0000
parents 3214dca89755
children 6b2ef948e140
comparison
equal deleted inserted replaced
3666:3214dca89755 3667:4c8ad140bcec
281 The second argument must be 'ucs, the third argument is ignored. " 281 The second argument must be 'ucs, the third argument is ignored. "
282 (assert (eq quote-ucs 'ucs) t 282 (assert (eq quote-ucs 'ucs) t
283 "Sorry, encode-char doesn't yet support anything but the UCS. ") 283 "Sorry, encode-char doesn't yet support anything but the UCS. ")
284 (char-to-unicode char)) 284 (char-to-unicode char))
285 285
286 (when (featurep 'mule)
287 ;; This CCL program is used for displaying the fallback UCS character set,
288 ;; and can be repurposed to lao and the IPA, all going well.
289 ;;
290 ;; define-ccl-program is available after mule-ccl is loaded, much later
291 ;; than this file in the build process. The below is the result of
292 ;;
293 ;; (macroexpand
294 ;; '(define-ccl-program ccl-encode-to-ucs-2
295 ;; `(1
296 ;; ((r1 = (r1 << 8))
297 ;; (r1 = (r1 | r2))
298 ;; (mule-to-unicode r0 r1)
299 ;; (r1 = (r0 >> 8))
300 ;; (r2 = (r0 & 255))))
301 ;; "CCL program to transform Mule characters to UCS-2."))
302 ;;
303 ;; and it should occasionally be confirmed that the correspondence still
304 ;; holds.
305
306 (let ((prog [1 10 131127 8 98872 65823 147513 8 82009 255 22]))
307 (defconst ccl-encode-to-ucs-2 prog
308 "CCL program to transform Mule characters to UCS-2.")
309 (put (quote ccl-encode-to-ucs-2) (quote ccl-program-idx)
310 (register-ccl-program (quote ccl-encode-to-ucs-2) prog)) nil))
311
286 ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's 312 ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's
287 ;; an implementation in appendix A.1 of the Unicode Standard, Version 313 ;; an implementation in appendix A.1 of the Unicode Standard, Version
288 ;; 2.0, but I don't know its licensing characteristics. 314 ;; 2.0, but I don't know its licensing characteristics.
289 315
290 ; (make-coding-system 316 ; (make-coding-system