Mercurial > hg > xemacs-beta
comparison lisp/unicode.el @ 3439:d1754e7f0cea
[xemacs-hg @ 2006-06-03 17:50:39 by aidan]
Just-in-time Unicode code point support.
author | aidan |
---|---|
date | Sat, 03 Jun 2006 17:51:06 +0000 |
parents | b921e3d0ac3e |
children | bcc2611d4cfc |
comparison
equal
deleted
inserted
replaced
3438:14fbcab7c67b | 3439:d1754e7f0cea |
---|---|
316 The second argument must be 'ucs, the third argument is ignored. " | 316 The second argument must be 'ucs, the third argument is ignored. " |
317 (assert (eq quote-ucs 'ucs) | 317 (assert (eq quote-ucs 'ucs) |
318 "Sorry, encode-char doesn't yet support anything but the UCS. ") | 318 "Sorry, encode-char doesn't yet support anything but the UCS. ") |
319 (char-to-unicode char)) | 319 (char-to-unicode char)) |
320 | 320 |
321 (when (featurep 'mule) | |
322 ;; This CCL program is used for displaying the fallback UCS character set, | |
323 ;; and can be repurposed to lao and the IPA, all going well. | |
324 ;; | |
325 ;; define-ccl-program is available after mule-ccl is loaded, much later | |
326 ;; than this file in the build process. The below is the result of | |
327 ;; | |
328 ;; (macroexpand | |
329 ;; '(define-ccl-program ccl-encode-to-ucs-2 | |
330 ;; `(1 | |
331 ;; ((r1 = (r1 << 8)) | |
332 ;; (r1 = (r1 | r2)) | |
333 ;; (mule-to-unicode r0 r1) | |
334 ;; (r1 = (r0 >> 8)) | |
335 ;; (r2 = (r0 & 255)))) | |
336 ;; "CCL program to transform Mule characters to UCS-2.")) | |
337 ;; | |
338 ;; and it should occasionally be confirmed that the correspondence still | |
339 ;; holds. | |
340 | |
341 (let ((prog [1 10 131127 8 98872 65823 147513 8 82009 255 22])) | |
342 (defconst ccl-encode-to-ucs-2 prog | |
343 "CCL program to transform Mule characters to UCS-2.") | |
344 (put (quote ccl-encode-to-ucs-2) (quote ccl-program-idx) | |
345 (register-ccl-program (quote ccl-encode-to-ucs-2) prog)) nil)) | |
346 | |
347 ;; Won't do this just yet, though. | |
348 ;; (set-charset-registry 'lao "iso10646-1") | |
349 ;; (set-charset-ccl-program 'lao 'ccl-encode-to-ucs-2) | |
350 ;; (set-charset-registry 'ipa "iso10646-1") | |
351 ;; (set-charset-ccl-program 'ipa 'ccl-encode-to-ucs-2) | |
352 | |
321 ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's | 353 ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's |
322 ;; an implementation in appendix A.1 of the Unicode Standard, Version | 354 ;; an implementation in appendix A.1 of the Unicode Standard, Version |
323 ;; 2.0, but I don't know its licensing characteristics. | 355 ;; 2.0, but I don't know its licensing characteristics. |
324 | 356 |
325 ; (make-coding-system | 357 ; (make-coding-system |