lua-users home
lua-l archive

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


On Friday 28 October 2005 17:15, PA wrote:
[...]
> The strings themselves are UTF-8 encoded, but I'm rather at loss on how
> to define a pattern to break those into meaningful 'characters' and let
> gsub() work in term of the pattern instead of each key.

Lua knows nothing of encodings, dealing instead with streams of bytes. This 
means that provided you ensure that the strings in the Lua source file use 
the same encoding as the strings you're manipulating, it'll Just Work (TM).

Since you're using UTF8 (which is the right choice), it should *still* Just 
Work, because your Lua code editor should be saving your source files as UTF8 
(because it's the right choice).

-- 
+- David Given --McQ-+ "I never really understood how there could be
|  dg@cowlark.com    | things that would drive you insane just because you
| (dg@tao-group.com) | knew them until I ran into Windows." --- Peter da
+- www.cowlark.com --+ Silva

Attachment: pgpCS72fWtuMD.pgp
Description: PGP signature