Markus
10/15/2004 2:25:00 PM
I know how octal works, thanks.
I also know that 8 is backspace, not bell. Bell is 7. Has been
for decades.
-- Markus
Oct Dec Hex Control-key Control Action
NUL 0 0 0 ^@ Null character
SOH 1 1 1 ^A Start of heading, = console interrupt
STX 2 2 2 ^B Start of text, maintenance mode on HP console
ETX 3 3 3 ^C End of text
EOT 4 4 4 ^D End of transmission, not the same as ETB
ENQ 5 5 5 ^E Enquiry, goes with ACK; old HP flow control
ACK 6 6 6 ^F Acknowledge, clears ENQ logon hang
BEL 7 7 7 ^G Bell, rings the bell
BS 10 8 8 ^H Backspace, works on HP terminals/computers
HT 11 9 9 ^I Horizontal tab, move to next tab stop
LF 12 10 a ^J Line Feed
VT 13 11 b ^K Vertical tab
FF 14 12 c ^L Form Feed, page eject
CR 15 13 d ^M Carriage Return
SO 16 14 e ^N Shift Out, alternate character set
SI 17 15 f ^O Shift In, resume default character set
DLE 20 16 10 ^P Data link escape
DC1 21 17 11 ^Q XON, with XOFF to pause listings; "okay to send"
DC2 22 18 12 ^R Device control 2, block-mode flow control
DC3 23 19 13 ^S XOFF, with XON is TERM=18 flow control
DC4 24 20 14 ^T Device control 4
NAK 25 21 15 ^U Negative acknowledge
SYN 26 22 16 ^V Synchronous idle
ETB 27 23 17 ^W End transmission block, not the same as EOT
CAN 30 24 18 ^X Cancel line, MPE echoes !!!
EM 31 25 19 ^Y End of medium, Control-Y interrupt
SUB 32 26 1a ^Z Substitute
ESC 33 27 1b ^[ Escape, next character is not echoed
FS 34 28 1c ^\ File separator
GS 35 29 1d ^] Group separator
RS 36 30 1e ^^ Record separator, block-mode terminator
US 37 31 1f ^_ Unit separator
On Fri, 2004-10-15 at 00:04, Christian Kaiser wrote:
> > IIRC, \010 if backspace, not bell. That would make 'a' (attention?) the
> > bell.
>
> Nope.
>
> \x010 is octal, so it's \x08 whis is bell.
>
> Fortunately it is not in RegEx. Whatever that code is for, it's not used for
> the escapes.
>
> I had a problem with '\w' only catching codes < 128 (simple 7 bit ASCII),
> but now I convert scripts and input data to UTF-8 (and select UTF-8 by
> ruby's command line), and this works perfectly. If only this would be
> readable. I'd rather have UTF-16 for everything (script and data), but
> well...
>
> Christian
>
>
>