10 #define UNICODE_LINEFEED 10
11 #define UNICODE_SPACE 32
12 #define UNICODE_QUESTIONMARK 63
14 #define ZSCII_NEWLINE 13
15 #define ZSCII_SPACE 32
16 #define ZSCII_QUESTIONMARK 63
18 /* This variable controls whether Unicode is used for screen
19 * output. This affects @check_unicode as well as the ZSCII to
20 * Unicode table. With Glk it is set based on whether the Glk
21 * implementation supports Unicode (checked with the Unicode
22 * gestalt), and determines whether Unicode IO functions should
23 * be used; otherwise, it is kept in parallel with use_utf8_io.
25 extern int have_unicode;
27 extern uint16_t zscii_to_unicode[];
28 extern uint8_t unicode_to_zscii[];
29 extern uint8_t unicode_to_zscii_q[];
30 extern uint8_t unicode_to_latin1[];
31 extern uint16_t zscii_to_font3[];
32 extern int atable_pos[];
34 void parse_unicode_table(uint16_t);
35 void setup_tables(void);
37 uint16_t unicode_tolower(uint16_t);
39 /* Standard 1.1 notes that Unicode characters 0–31 and 127–159
40 * are invalid due to the fact that they’re control codes.
42 static inline int valid_unicode(uint16_t c) { return (c >= 32 && c <= 126) || c >= 160; }