1087 |
} |
} |
1088 |
|
|
1089 |
|
|
|
/* Fixme: deal with surrogates? */ |
|
1090 |
static void |
static void |
1091 |
decode_coding_utf_8 (coding) |
decode_coding_utf_8 (coding) |
1092 |
struct coding_system *coding; |
struct coding_system *coding; |
1152 |
{ |
{ |
1153 |
c = (((c1 & 0xF) << 12) |
c = (((c1 & 0xF) << 12) |
1154 |
| ((c2 & 0x3F) << 6) | (c3 & 0x3F)); |
| ((c2 & 0x3F) << 6) | (c3 & 0x3F)); |
1155 |
if (c < 0x800) |
if (c < 0x800 |
1156 |
|
|| (c >= 0xd800 && c < 0xe000)) /* surrogates (invalid) */ |
1157 |
goto invalid_code; |
goto invalid_code; |
1158 |
} |
} |
1159 |
else |
else |