[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: New to LUA, trying to read from a file
- From: "Matthew Wild" <mwild1@...>
- Date: Wed, 8 Oct 2008 12:37:39 +0100
On Wed, Oct 8, 2008 at 12:30 PM, Brian Sanders <brian.sanders@gmail.com> wrote:
> Hmm... so if it is in either UTF-16 or UCS-2 with BOM... is there any way
> for me to use these log files with a LUA script? I guess it is good to know
> that I did understand the LUA tutorials, it was my input file I was not
> looking closely enough at.
>
It's a hack, and there is probably a nice(r) way of doing it, but try:
logstring = logstring:sub(3):gsub("%z", "")
It will at least remove the zeros that stop it from printing, but if
you have non-latin characters then they might get messed up.
Matthew.
- References:
- New to LUA, trying to read from a file, Brian Sanders
- Re: New to LUA, trying to read from a file, Tim Channon
- Re: New to LUA, trying to read from a file, Brian Sanders
- Re: New to LUA, trying to read from a file, Klaus Ripke
- Re: New to LUA, trying to read from a file, Klaus Ripke
- Re: New to LUA, trying to read from a file, Brian Sanders