lua-users home
lua-l archive

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


> It allows you to add "incidental" characters without the need for a 
> fully functional editor for that language.

Thanks for the explanation. Anyway, if the point is "incidental" use,
those that need may set an auxiliary function and write code like
this:

  x = U"this is pi: U+003C0"

with U defined appropriately:

function L (s)
  return string.gsub(s, "U+(%x+)", function (n)
    n = tonumber(n, 16)
    if n <= 127 then return string.char(n)
    elseif n <= 2047 then
      return string.char(192 + n/64, 128 + n%64)
    elseif ...
  end)
end

-- Roberto