You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: