Chat: Difference between revisions
imported>MAD (Document that one bug.) |
imported>MAD (Document that one bug.) |
(No difference)
| |
Revision as of 23:34, 30 December 2010
Chat strings are subject to myriad limitations imposed by defects in the Notchian server and client, and also have special meanings for certain characters.
Character Set
The following list of characters is known to be supported by the Notchian server:
"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»"
Characters not in this list will cause Notchian servers to kick clients, and Notchian clients to choke and die horribly.
Colors
The Notchian client has support for colorized text. To select a color, a color escape code, similar to an ANSI color escape code, is inserted to change the color of the following characters.
| Character | Color |
|---|---|
| 0 | Black |
| 1 | Dark blue |
| 2 | Dark green |
| 3 | Dark cyan |
| 4 | Dark red |
| 5 | Dark magenta |
| 6 | Dark orange |
| 7 | Gray |
| 8 | Dark gray |
| 9 | Blue |
| a | Green |
| b | Cyan |
| c | Red |
| d | Magenta |
| e | Yellow |
| f | White |
These correspond very roughly to the colors available in ANSI terminals.
A color escape code is created by combining the control character § (U+00A7) with the character specifying the color; thus, "§4" selects dark red as the color for the following text.
Bugs
The Notchian client expects that a color escape code in a chat message will be followed by at least one character, and will otherwise crash with a StringIndexOutOfBoundsException. The workaround for servers is to never end a message with a color control character.