[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua 5.1 and UTF-8 ?
- From: Asko Kauppi <askok@...>
- Date: Sun, 22 May 2005 19:55:25 +0300
I've been thinking about UTF-8 and Lua lately, and wonder how much
work it would be to actually support that in Lua "out of the box".
There are some programming languages (s.a. Tck) that claim already to
do that, and I feel the concept would match Lua's targets and
philosophy rather nicely.
I understand UTF-8 might not be everyone's favourite, but it is
mine. :) And having a working framework (str:bytes(), str:length(),
str:width()) could easily be adopted to other extended encoding
schemes as well.
The reason I'm bringing this up right now, is that the issue could
suit nicely with the 5.1 "every type has a metatable" way of
thinking; would it warrant an opportunity to have a closer look at
what Lua means by 'strings' (or rather, their encoding) anyhow?
The only thing important for me (or.. end users in general?) would be
not to have two different ways for strings. "Hello" and L"Hello"
should not be necessary, imho. In UTF-8, they aren't.
UTF-8 in a nutshell: