comparison 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
comparison
equal deleted inserted replaced
2621:a5158a1f89a4 2622:c8a9be2d4728
1279 `set-unicode-charset-precedence'). 1279 `set-unicode-charset-precedence').
1280 1280
1281 When there is no international support (i.e. the 'mule feature is not 1281 When there is no international support (i.e. the 'mule feature is not
1282 present), this function simply does `int-to-char' and ignores the CHARSETS 1282 present), this function simply does `int-to-char' and ignores the CHARSETS
1283 argument. 1283 argument.
1284
1285 Note that the current XEmacs internal encoding has no mapping for many
1286 Unicode code points, and if you use characters that are vaguely obscure with
1287 XEmacs' Unicode coding systems, you will lose data.
1288
1289 To add support for some desired code point in the short term--note that our
1290 intention is to move to a Unicode-compatible internal encoding soon, for
1291 some value of soon--if you are a distributor, add something like the
1292 following to `site-start.el.'
1293
1294 (make-charset 'distro-name-private
1295 "Private character set for DISTRO"
1296 '(dimension 1
1297 chars 96
1298 columns 1
1299 final ?5 ;; Change this--see docs for make-charset
1300 long-name "Private charset for some Unicode char support."
1301 short-name "Distro-Private"))
1302
1303 (set-unicode-conversion
1304 (make-char 'distro-name-private #x20) #x263A) ;; WHITE SMILING FACE
1305
1306 (set-unicode-conversion
1307 (make-char 'distro-name-private #x21) #x3030) ;; WAVY DASH
1308
1309 ;; ...
1310 ;;; Repeat as necessary.
1311
1312 Redisplay will work on the sjt-xft branch, but not with server-side X11
1313 fonts as is the default. However, data read in will be preserved when they
1314 are written out again.
1315
1284 */ 1316 */
1285 (code, USED_IF_MULE (charsets))) 1317 (code, USED_IF_MULE (charsets)))
1286 { 1318 {
1287 #ifdef MULE 1319 #ifdef MULE
1288 Lisp_Object_dynarr *dyn; 1320 Lisp_Object_dynarr *dyn;