]> git.pond.sub.org Git - empserver/blob - doc/unicode
Support UTF-8 encoded Unicode for user communications.
[empserver] / doc / unicode
1 Unicode changes:
2
3 1. toggle UTF-8
4
5    Add utf8 as a toggle option and store in the nat_flags field in
6    nation structure.  In the future, this should be a login option
7    rather than a country toggle once the login options are added.
8
9 2. flash and wall
10
11    a. Message as command argument
12
13       Interpret raw command line as message text rather than normal
14       text.
15
16    b. Multi-line mode
17
18       Read message lines as message text rather than normal text.
19
20    c. Break long lines
21
22       Count the charactes using utf8 format.  This works for both ASCII
23       and UTF8 formatted strings.
24
25    d. Print lines
26
27       Print as message text rather than normal text.
28
29 3. Telexes and telex-like things
30
31    a. read and wire, MOTD and gamedown message
32
33       Print as message text rather than normal text.
34
35    c. tele, anno, pray, turn.
36
37       Read as message text rather than normal text.
38
39 4. Input filtering
40
41    a. Parsing commands (normal text)
42
43       Ignore control and non-ASCII characters when copying argument
44       strings.
45
46    b. Reading normal text command arguments
47
48       Replace control and non-ASCII characters, except for tab with
49       "?'.
50
51    c. Reading message text command arguments
52
53       Support message text arguments, used by 3a. and 2b.  Replace
54       control and, if NF_UTF8 is off, non-ASCII characters.
55
56 5. Output filtering
57
58    Output filtering asssumes that there are no control characters or
59    invalid characters in the output messages.  The control characters
60    and invalid characters are filtered out during input filtering or
61    that the server will not generate control characters or invalid
62    characters.
63
64    a. Printing normal text
65
66       When NF_UTF8 is on, highlighted text is printed using SO/SI.
67
68    b. Printing message text
69
70       When NF_UTF8 is off, replace UTF8 charactes with '?'.
71
72
73 Definitions:
74
75 1. Normal Text
76         For normal text, the following ASCII characters are valid:
77         CR, LF and 0x20-0x7e.  Normally, LF is an termination action
78         event.  Normally, CR is not used except by the server.
79         Normal Text does not support UTF8 characters.  In normal
80         text, the 8th bit is used a highlight bit.  If the client
81         has the utf8 nation flag set, the standout bit is removed
82         and the highlight block is prefixed with SO (ASCII standout)
83         and suffixed with SI (ASCII standin).
84         
85 2. Message Text
86         For message text, the following ASCII characters are valid:
87         Tab, CR, LF and 0x020-0x7e.  Normally, LF is an termination
88         action event.   Normally, CR is not used except by the server.
89         Message text also supports UTF8 characters if the utf8 nation
90         flag is turn on otherwise only the ASCII characters are
91         supported.
92
93
94 Notes:
95
96 1. Strings that considered message text are commented.
97
98 2. Both Normal and Message text are char strings are in the server.
99         Care needs to be taken as some compiler consider char
100         signed and other default to unsigned char.
101
102 3. Unicode functions are prefixed with u.