lua-users home
lua-l archive

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


Hi,
      I was trying to use the ltn12 base64 encoding filter but I think I don't understand it clearly. If I do the following:

Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> mime = require("mime")
> print(ltn12)
table: 00B6D1F0
> enc = mime.encode("base64")
> print(enc("Test Text"))
VGVzdCBUZXh0
> print(enc())
nil
> print(enc())
nil
> print(enc("Test Text"))
nil
>


For the last one I was expecting to give me the encoding again. Why did it give me nil? Is it not the right way to reuse the filter? Any help would be appreciated.

Thanks,
Milind