Cyrillic not being decoded properly
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Cyrillic not being decoded properly
Hey folks, I am currently trying to make a small program which will read off some text in cyrillic, however it doesn't get decoded properly. Even though it is in UTF-8 it reads it as if its ANSI. I figured that Love2D doesn't support UTF-8, but I checked and apparently it does in 0.8.0, so I am not sure if I am doing something wrong here. If anyone can help me test this, just make a small example code to read off a text file containing абвгд and see what you get with that. Thanks in advance
Re: Cyrillic not being decoded properly
the cyrillic text comes from a text file? if so, then make sure you save it with the proper encoding, if I remember correct, you need "UTF-8 without BOM"
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Cyrillic not being decoded properly
It might help if you show us what you've got, and upload your .love as an attachment.
Help us help you: attach a .love.
Re: Cyrillic not being decoded properly
Wow I feel like an idiot now. The problem was that I was debugging this in the console and for some reason I guess it decodes it wierd-like. But when I enter cyrillic text on the screen and I make it use a font that has Cyrillic, such as Arial, it displays properly. Really sorry for wasting time with this. Thread can be closed.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Cyrillic not being decoded properly
Lua's inbuilt print function (or any of the standard lua functions, for that matter) do not handle utf-8. Love's print (the one from love.graphics), and supposedly any other functions that have to deal with utf-8, do.. hopefully..
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], zingo and 4 guests