diff src/unicode.c @ 2622:c8a9be2d4728

[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.
author aidan
date Mon, 28 Feb 2005 23:36:32 +0000
parents 9f70af3ac939
children 114400ea911b
line wrap: on
line diff
--- 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)))
 {