changeset 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 a5158a1f89a4
children 48facb601f29
files src/ChangeLog src/unicode.c
diffstat 2 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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  <kehoea@parhasard.net>
+
+	* 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  <kehoea@parhasard.net>
 
 	* select-gtk.c (emacs_gtk_selection_handle):
--- 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)))
 {