lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>From  Tue Feb 29 21:43:12 2000
>From: "Ashley Fryer" <>
>Under 3.1, from the lua console:
>Expected output:
>Actual output:
>[unprintable, ascii 8, backspace]
>Can someone confirm whether or not this is a bug, and if it's still present
>in later versions?

No, this is not a bug.
When dostring("print('\\b')") is parsed, the compiler sees a string
"print('\\b')", in which it then recognizes the escape sequence \\ and replaced
by the char \. So, the string is actually print('\b'). When this is parsed again
when dostring is executed, then \b is recognized as backspace, which is ascii 8.

To print \b (two-char string), you need to use