luautf8
luautf8 copied to clipboard
luautf8 needs utf8.format (to replace string.format)
Your README says "Some routines in string module needn't support Unicode: string.format" However, this code is proof that string.format does need unicode support:
print(string.format("%-35s", "abcdefghijklmnopqrstuvwxyz")) print(string.format("%-35s", "àb¢défghijklmnöpqrstüvwxyz"))
string.format does not count utf8 characters, it counts the number of bytes, so when you used a fixed size in the formatting string and accented characters are used, string.format gets it wrong.