Habitat Sign Escape and Graphical Character Codes - frandallfarmer/neohabitat GitHub Wiki
These are the character escape codes that you may use in an ASCII byte array to represent non-printing characters and Habitat sign formatting symbols:
| Character | Description | ASCII code | hex |
|---|---|---|---|
| \n | newline | 10 | x0a |
| \t | horizontal tab | ? | ? |
| \b | backspace | ? | ? |
| \r | carriage return | 13 | x0d |
| \f | form feed | ? | ? |
| \e | escape | ? | ? |
| \\ | backslash | 109 | x4D |
| ' | apostrophe | 39 | x27 |
| " | quote | 34 | x22 |
| \ | (backslash-space) half space | 128 | x80 |
| \# | double space | 143 | x8f |
| \+ | increment text width | 129 | x81 |
| \- | decrement text width | 130 | x82 |
| \( | increment text height | 131 | x83 |
| \) | decrement text height | 132 | x84 |
| \h | half size characters | 133 | x85 |
| \R | sign carriage return | 134 | x86 |
| \d | move half character space down | 139 | x8b |
| \i | shift to inverse video | 140 | x8c |
| \> | cursor right | 135 | x87 |
| \< | cursor left | 136 | x88 |
| \^ | cursor up | 137 | x89 |
| \v | cursor down | 138 | x8a |
| \c | CONTROL-c (where c is any character) | 1-26 | x01-x1a |
| \ddd | arbitrary byte (where ddd is one, two or three octal digits) | ddd10 | ddd16 |
| \xhh | arbitrary byte (where hh is one or two hexadecimal digits) | hh10 | hh |
As an example, lets say your original text is represented as this in your griddle file where you'll encounter these escape characters:
- GRI text:
"\hOrder\h of the \hHoly\h \hWalnut " - is the same as:
"\x85Order\x85 of the \x85Holy\x85 \x85Walnut "
Strings are messy in JSON and Java, so we've got a special attribute name for these bytes on signs: "ascii":[bytes], so the same sign text is stored in the database as:
"ascii":[133,79,114,100,101,114,133,32,111,102,32,116,104,101,32,133,72,111,108,121,133,32,133,87,97,108,110,117,116]- NOTE: RDL files already represent the sign text as byte codes and can be used as they appear in the file.
- No need to decode them using this table.
ASCII to Hex - A useful website for converting your plaintext into ASCII (decimal)
| . | desc | dec | hex | oct |
|---|---|---|---|---|
| Diag_DR | 9 | /x09 | /11 | |
| Diag_DL | 31 | /x1f | /37 | |
| Diag_UL | 11 | /x0b | /13 | |
| Diag_UR | 12 | /x0c | /14 | |
| Box_DR | 13 | /x0d | /15 | |
| Box_DL | 14 | /x0e | /16 | |
| Box_UL | 15 | /x0f | /17 | |
| Box_UR | 16 | /x10 | /20 | |
| Circ_DR | 17 | /x11 | /21 | |
| Circ_DL | 18 | /x12 | /22 | |
| Circ_UL | 19 | /x13 | /23 | |
| Circ_UR | 20 | /x14 | /24 | |
| Box_CR | 21 | /x15 | /25 | |
| Box_CL | 22 | /x16 | /26 | |
| Box_CU | 23 | /x17 | /27 | |
| Box_CD | 24 | /x18 | /30 | |
| Box_C | 25 | /x19 | /31 | |
| Line_UD | 26 | /x20 | /32 | |
| Line_LR | 27 | /x21 | /33 | |
| Ball | 28 | /x22 | /34 | |
| Ball_filled | 29 | /x23 | /35 | |
| Ball_alternate | 30 | /x24 | /36 | |
| Black_char | 96 | /x60 | /140 | |
| Squiggle | 123 | /x7a | /173 | |
| Arrow_U | 124 | /x7c | /174 | |
| Arrow_D | 125 | /x7d | /175 | |
| Arrow_L | 126 | /x7e | /176 | |
| Arrow_R | 127 | /x7f | /177 |