Closed slime73 closed 13 years ago
Original comment by Boolsheet (Bitbucket: Boolsheet, GitHub: Boolsheet).
font:getWrap(string, width) also uses UTF-8 and has no exception handling yet. \\ https://bitbucket.org/rude/love/src/3a3111c0c6cb/src/modules/graphics/opengl/Font.cpp#cl-247 \\ Uhm, there might be even more UTF-8 iterators.
Original comment by Boolsheet (Bitbucket: Boolsheet, GitHub: Boolsheet).
The following makes the UTF-8 library throw invalid_code_point that doesn't get caught yet. \\
#!lua
str = "\113\233\129\139\227\134\146\236\188\129\233\151\134\231\171"..
"\161\229\166\187\238\149\145\237\138\157\235\188\156\226\178\169\237\175\153"
love.graphics.print(str, 10, 10)
Original report by Boolsheet (Bitbucket: Boolsheet, GitHub: Boolsheet).
The UTF-8 library throws exceptions on invalid strings (and possibly other things) that don't get caught yet.
Attached a .love with the UTF-8 stress test. Notice that there's a null character in the text before the malformed sequences and LÖVE stops decoding. Press 0 to replace it.