# HG changeset patch # User aidan # Date 1109633792 0 # Node ID c8a9be2d4728fe1d542b2a3be3c684af61d16335 # Parent a5158a1f89a40e7e6700c2023868a0eecf7b33f5 [xemacs-hg @ 2005-02-28 23:36:30 by aidan] Add details about losing data to the unicode-to-char docstring. The Mule character encoding model means that extant Unicode coding systems will lose data. Make this clear in the docstring of unicode-to-char, give sample code to implement support for some desired code points should our distributors want to do that. diff -r a5158a1f89a4 -r c8a9be2d4728 src/ChangeLog --- a/src/ChangeLog Mon Feb 28 22:51:03 2005 +0000 +++ b/src/ChangeLog Mon Feb 28 23:36:32 2005 +0000 @@ -1,3 +1,11 @@ +2005-03-01 Aidan Kehoe + + * unicode.c: The Mule character encoding model means that extant + Unicode coding systems will lose data. Make this clear in the + docstring of unicode-to-char, give sample code to implement + support for some desired code points should our distributors want + to do that. + 2005-02-28 Aidan Kehoe * select-gtk.c (emacs_gtk_selection_handle): diff -r a5158a1f89a4 -r c8a9be2d4728 src/unicode.c --- a/src/unicode.c Mon Feb 28 22:51:03 2005 +0000 +++ b/src/unicode.c Mon Feb 28 23:36:32 2005 +0000 @@ -1281,6 +1281,38 @@ When there is no international support (i.e. the 'mule feature is not present), this function simply does `int-to-char' and ignores the CHARSETS argument. + +Note that the current XEmacs internal encoding has no mapping for many +Unicode code points, and if you use characters that are vaguely obscure with +XEmacs' Unicode coding systems, you will lose data. + +To add support for some desired code point in the short term--note that our +intention is to move to a Unicode-compatible internal encoding soon, for +some value of soon--if you are a distributor, add something like the +following to `site-start.el.' + +(make-charset 'distro-name-private + "Private character set for DISTRO" + '(dimension 1 + chars 96 + columns 1 + final ?5 ;; Change this--see docs for make-charset + long-name "Private charset for some Unicode char support." + short-name "Distro-Private")) + +(set-unicode-conversion + (make-char 'distro-name-private #x20) #x263A) ;; WHITE SMILING FACE + +(set-unicode-conversion + (make-char 'distro-name-private #x21) #x3030) ;; WAVY DASH + +;; ... +;;; Repeat as necessary. + +Redisplay will work on the sjt-xft branch, but not with server-side X11 +fonts as is the default. However, data read in will be preserved when they +are written out again. + */ (code, USED_IF_MULE (charsets))) {