LOVE uses utf-8 encoding. It's a multi byte encoding compatible with ASCII, which is single byte. It detects multi byte characters by most significant bit - all ASCII characters have this bit set to 0, so if it's 1 then it's a multi byte character. In an unsigned 8 bit integer, most significant bit set to 1 adds 128, and vice versa. If this bit is set, then it expects this and following bytes to encode a utf-8 character. Which in your case they obviously don't.
The solution to your problem is to supply character list manually. Which is what you should do either way.
Or in other words, write out all the characters you want it to have... and make sure they're saved with UTF-8 encoding (without byte-order mark) otherwise you will have the same problem.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Wilma456 wrote: ↑Thu Aug 10, 2017 5:15 pm
The first Chars are not there. It is just space, I can't copy it into my file. Any other Idea?
The first 32 ANSI characters are not printable, so you're not going to be able to draw them using Love2D.
The Lua console will probably fail to display UTF8 too.
If you're trying to draw a string that contains these control characters,
you can take your Lua string and replace the specific chars with something like \1, \2, \3, etc.
local glyphs = "\1\2\3\4\5\6\7\8\9\10\11\12\13\14\15\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31\32\33\34\35\36\37\38\39\40\41\42\43\44\45\46\47\48\49\50\51\52\53\54\55\56\57\58\59\60\61\62\63\64\65\66\67\68\69\70\71\72\73\74\75\76\77\78\79\80\81\82\83\84\85\86\87\88\89\90\91\92\93\94\95\96\97\98\99\100\101\102\103\104\105\106\107\108\109\110\111\112\113\114\115\116\117\118\119\120\121\122\123\124\125\126\127\128\129\130\131\132\133\134\135\136\137\138\139\140\141\142\143\144\145\146\147\148\149\150\151\152\153\154\155\156\157\158\159\160\161\162\163\164\165\166\167\168\169\170\171\172\173\174\175\176\177\178\179\180\181\182\183\184\185\186\187\188\189\190\191\192\193\194\195\196\197\198\199\200\201\202\203\204\205\206\207\208\209\210\211\212\213\214\215\216\217\218\219\220\221\222\223\224\225\226\227\228\229\230\231\232\233\234\235\236\237\238\239\240\241\242\243\244\245\246\247\248\249\250\251\252\253\254\255"
Screen.font = love.graphics.newImageFont("res/font.png",glyphs)
But I got the UTF-8 error.
raidho36 wrote: ↑Thu Aug 10, 2017 9:25 pm
Windows terminal could fail to print UTF-8, but I know for a fact that in Linux any terminal would print it just fine.