Mercurial > hg > xemacs-beta
diff src/unicode.c @ 2704:114400ea911b
[xemacs-hg @ 2005-03-31 14:56:37 by aidan]
Fix Unicode conversion for control-1, prevent a segfault with
set-unicode-conversion.
author | aidan |
---|---|
date | Thu, 31 Mar 2005 14:56:48 +0000 |
parents | c8a9be2d4728 |
children | 6fa9919a9a0b |
line wrap: on
line diff
--- a/src/unicode.c Thu Mar 31 11:28:44 2005 +0000 +++ b/src/unicode.c Thu Mar 31 14:56:48 2005 +0000 @@ -857,6 +857,9 @@ sledgehammer_check_unicode_tables (charset); #endif + if (EQ(charset, Vcharset_ascii) || EQ(charset, Vcharset_control_1)) + return; + /* First, the char -> unicode translation */ if (XCHARSET_DIMENSION (charset) == 1) @@ -1921,7 +1924,13 @@ { /* Processing Non-ASCII character */ char_boundary = 1; if (EQ (charset, Vcharset_control_1)) - encode_unicode_char (Vcharset_control_1, c, 0, dst, + /* See: + + (Info-goto-node "(internals)Internal String Encoding") + + for the rationale behind subtracting #xa0 from the + character's code. */ + encode_unicode_char (Vcharset_control_1, c - 0xa0, 0, dst, type, little_endian); else {