lua-users home
lua-l archive

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



Am 08.04.2016 um 12:54 schrieb Michal Kottman <michal.kottman@gmail.com>:


On 7 April 2016 at 16:40, Marc Balmer <marc@msys.ch> wrote:
(Expected is 'ÄÖÜ')

You need an external library which understands all of Unicode. Not advocating anything in particular, just picking a first 'Lua utf8' library that a simple web search returned:

$ sudo luarocks install luautf8
$ lua
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> utf8 = require 'lua-utf8'
> = utf8.upper('äöü')
ÄÖÜ
> for m in utf8.gmatch('äöü', '%g+') do print(m) end
äöü



Note that I used ISO-8859-1 in my example, not UTF-8.