Getting a UTF-8 error while trying to reverse and print Hebrew text
Posted: Wed Jun 10, 2020 11:19 am
Hey! I'm trying to implement a Hebrew translation to my game along my English one, and because of how lua works with rtl languages (which it really isn't) I have to reverse the text to print it correctly. So I tried using lua's built in string manipulation in string.reverse, but I'm getting this error while running and trying to print with love.graphics.printf on my main file with the love.draw function: "UTF-8 decoding error: Invalid UTF-8".
To clarify, I am using a font that has Hebrew chars, and tried printing it with manually reversing the text and it worked just fine. I'm using Visual Studio Code to write the game.
I know this can be conquered by just reversing manually or using a site to reverse long strings of text, but I would really like to be able to print Hebrew text semi-native-ly.
Thanks a lot
To clarify, I am using a font that has Hebrew chars, and tried printing it with manually reversing the text and it worked just fine. I'm using Visual Studio Code to write the game.
I know this can be conquered by just reversing manually or using a site to reverse long strings of text, but I would really like to be able to print Hebrew text semi-native-ly.
Thanks a lot