Actions

Difference between revisions of "Character escape codes"

From Zenitel Wiki

Line 9: Line 9:
 
Escape sequences:
 
Escape sequences:
 
{| border="1"
 
{| border="1"
! style="background:#ffdead;" width="30" | Char
 
 
! style="background:#ffdead;" width="70" | Escape sequence
 
! style="background:#ffdead;" width="70" | Escape sequence
 
! style="background:#ffdead;" width="70" | Result
 
! style="background:#ffdead;" width="70" | Result
! style="background:#ffdead;" width="30" | Hex
+
! style="background:#ffdead;" width="30" | Hex code
 
! style="background:#ffdead;" width="150" | Description
 
! style="background:#ffdead;" width="150" | Description
 
|-
 
|-
| align=center| , || align=center|\, || align=center| , || 2C || Comma
+
| align=center|\, || align=center| , || 2C || Comma
 
|-
 
|-
| align=center| ( || align=center|\( || align=center| ( || 28 || Opening parenthese
+
| align=center|\( || align=center| ( || 28 || Opening parenthese
 
|-
 
|-
| align=center| ) || align=center|\) || align=center| ) || 29 || Closing parenthese
+
| align=center|\) || align=center| ) || 29 || Closing parenthese
 
|-
 
|-
| align=center| " || align=center|\" || align=center| " || 22 || Double quote
+
| align=center|\" || align=center| " || 22 || Double quote
 
|-
 
|-
| align=center| ; || align=center|\; || align=center| ; || 3B || Semicolon
+
| align=center|\; || align=center| ; || 3B || Semicolon
 
|-
 
|-
| align=center| \ || align=center|\\ || \ || 5C || Backslash
+
| align=center|\\ || align=center|\ || 5C || Backslash
 
|-
 
|-
| align=center| % || align=center|\% || % || 25 || Percent
+
| align=center|\% || align=center|% || 25 || Percent
 
|-
 
|-
| align=center| TAB || align=center|\t || TAB || 09 || ASCII TAB (Horisontal tab)
+
| align=center|\t || align=center|TAB || 09 || ASCII TAB (Horisontal tab)
 
|-
 
|-
| align=center| SP || align=center|\s || SP || 20 || Space
+
| align=center|\s || align=center|SP || 20 || Space
 
|-
 
|-
| align=center| CR || align=center|\r || CR || 0D || Carriage return
+
| align=center|\r || align=center|CR || 0D || Carriage return
 
|-
 
|-
| align=center| LF || align=center|\n || LF || 0A || Line feed
+
| align=center|\n || align=center|LF || 0A || Line feed
 
|-
 
|-
| align=center| BEL || align=center|\a || BEL || 07 || Bell (Alert)
+
| align=center|\a || align=center|BEL || 07 || Bell (Alert)
 
|-
 
|-
| align=center| BS || align=center|\b || BS || 08 || Backspace
+
| align=center|\b || align=center|BS || 08 || Backspace
 
|-
 
|-
| align=center| NUL || align=center|\0 || NUL || 00 || ASCII NUL
+
| align=center|\0 || align=center|NUL || 00 || ASCII NUL
 
|-
 
|-
| align=center|   || align=center|\l ||   || 80 || Extended NUL ('\x80')
+
| align=center|\l ||   || 80 || Extended NUL ('\x80')
 
|-
 
|-
| align=center|   || align=center|\! || align=center|   ||   || Comment / ignore rest of string
+
| align=center|\! || align=center|   ||   || Comment / ignore rest of string
 
|-
 
|-
| align=center|   || align=center|\xhh || align=center|   ||   || 'hh' is the ASCII character code as 2 hex digits. Note that you must use 2 digits.
+
| align=center|\xhh || align=center|   ||   || 'hh' is the ASCII character code as 2 hex digits. Note that you must use 2 digits.
 
|-
 
|-
| align=center|   || align=center|\#hh || align=center|   ||   || 'hh' is the ASCII character code as 2 hex digits. Note that you must use 2 digits.
+
| align=center|\#hh || align=center|   ||   || 'hh' is the ASCII character code as 2 hex digits. Note that you must use 2 digits.
 
|-
 
|-
 
|}
 
|}

Revision as of 13:17, 21 October 2008

Escape sequences use an escape character to change the meaning of the characters which follow it. In the Event Handler backslash (\) is used as escape character. Escape sequences might be used in the EDO command to generate non-printable ASCII characters.

Some frequently used escape sequences:

\r = Carriage Return
\n = Line Feed
\t = Tab 
\xhh = hh is any ASCII value in HEX

Escape sequences:

Escape sequence Result Hex code Description
\, , 2C Comma
\( ( 28 Opening parenthese
\) ) 29 Closing parenthese
\" " 22 Double quote
\; ; 3B Semicolon
\\ \ 5C Backslash
\% % 25 Percent
\t TAB 09 ASCII TAB (Horisontal tab)
\s SP 20 Space
\r CR 0D Carriage return
\n LF 0A Line feed
\a BEL 07 Bell (Alert)
\b BS 08 Backspace
\0 NUL 00 ASCII NUL
\l   80 Extended NUL ('\x80')
\!     Comment / ignore rest of string
\xhh     'hh' is the ASCII character code as 2 hex digits. Note that you must use 2 digits.
\#hh     'hh' is the ASCII character code as 2 hex digits. Note that you must use 2 digits.



By using the escape sequence '\xhh' all sorts of ASCII characters can be generated.