David Given wrote:
You can convert a complete string with: local ebcdics = string.gsub(asciis, ".", function (s) return ascii_to_ebcdic[s] end)
Or (if it's Lua 5.1): local ebcdics = asciis:gsub(".", ascii_to_ebcdic) -- Shmuel