[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to handle \026 character in a string
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 22 Oct 2010 10:21:24 -0200
> My lua code needs to deal with strings that contain \026 characters in them.
There seems to be a confusion here. Lua strings can definitely contain
all bytes, including control characters like \026. However, you should
not put such binary data directly inside *literal* strings that are
fed to the Lua parser. You need to use escape sequences to encode all
nonprintable characters. (The current implementation does tolerate most
of those, but notably not newlines, and you should not count on this behavior.)