aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charset.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/charset.c b/src/charset.c
index 054b2848894..bf3944d47fa 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -141,6 +141,20 @@ non_ascii_char_to_string (c, workbuf, str)
141{ 141{
142 int charset, c1, c2; 142 int charset, c1, c2;
143 143
144 if (c & ~GLYPH_MASK_CHAR)
145 {
146 if (c & CHAR_META)
147 /* Move the meta bit to the right place for a string. */
148 c |= 0x80;
149 if (c & CHAR_CTL)
150 c &= 0x9F;
151 else if (c & CHAR_SHIFT && (c & 0x7F) >= 'a' && (c & 0x7F) <= 'z')
152 c -= 'a' - 'A';
153 *str = workbuf;
154 *workbuf = c;
155 return 1;
156 }
157
144 if (c < 0) 158 if (c < 0)
145 invalid_character (c); 159 invalid_character (c);
146 160
@@ -1078,6 +1092,9 @@ char_bytes (c)
1078{ 1092{
1079 int bytes; 1093 int bytes;
1080 1094
1095 if (SINGLE_BYTE_CHAR_P (c) || (c & ~GLYPH_MASK_CHAR))
1096 return 1;
1097
1081 if (COMPOSITE_CHAR_P (c)) 1098 if (COMPOSITE_CHAR_P (c))
1082 { 1099 {
1083 unsigned int id = COMPOSITE_CHAR_ID (c); 1100 unsigned int id = COMPOSITE_CHAR_ID (c);