comparison lisp/unicode.el @ 2633:b921e3d0ac3e

[xemacs-hg @ 2005-03-04 21:59:42 by aidan] Add encode-char and decode-char functions, for wider Mule compatibility. They do unicode-to-char and char-to-unicode, and are implemented in Mule-UCS and GNU Emacs.
author aidan
date Fri, 04 Mar 2005 21:59:43 +0000
parents e71117a6ddac
children d1754e7f0cea
comparison
equal deleted inserted replaced
2632:a94fafdc4b7d 2633:b921e3d0ac3e
302 Standard encoding for representing UTF-8 under MS Windows." 302 Standard encoding for representing UTF-8 under MS Windows."
303 type utf-8 303 type utf-8
304 little-endian t 304 little-endian t
305 need-bom t)) 305 need-bom t))
306 306
307 (defun decode-char (quote-ucs code &optional restriction)
308 "FSF compatibility--return Mule character with Unicode codepoint `code'.
309 The second argument must be 'ucs, the third argument is ignored. "
310 (assert (eq quote-ucs 'ucs)
311 "Sorry, decode-char doesn't yet support anything but the UCS. ")
312 (unicode-to-char code))
313
314 (defun encode-char (char quote-ucs &optional restriction)
315 "FSF compatibility--return the Unicode code point of `char'.
316 The second argument must be 'ucs, the third argument is ignored. "
317 (assert (eq quote-ucs 'ucs)
318 "Sorry, encode-char doesn't yet support anything but the UCS. ")
319 (char-to-unicode char))
320
307 ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's 321 ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's
308 ;; an implementation in appendix A.1 of the Unicode Standard, Version 322 ;; an implementation in appendix A.1 of the Unicode Standard, Version
309 ;; 2.0, but I don't know its licensing characteristics. 323 ;; 2.0, but I don't know its licensing characteristics.
310 324
311 ; (make-coding-system 325 ; (make-coding-system