I am currently looking for a semi-elegant method of matching all letters that are not special language characters like ä, ë, ö, ü, etc. and have been having some trouble.
At first I tried :gsub("%w", string.upper, 1) to replace the first letter of a string with a capital, however this caused any of the above special language characters to become "xx."
I then tried string.sub(teststring, 1, 1) to get just the first character of a string, and it seems these special characters are using 2 (sometimes more?) characters, probably an escape code and a number, to render the actual symbol, so again, I ended up with just "x".
Is there a way to have lua only match the first character in a string if it is a letter and NOT one of these special letters?
In standard Lua, it's not easy. There are a couple pure-Lua libraries there that you could use if you needed to for unicode pattern matching (and other string functions).