Cyrillic not being decoded properly

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
CGNick
Prole
Posts: 2
Joined: Wed Jun 26, 2013 10:11 am

Cyrillic not being decoded properly

Post by CGNick »

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
User avatar
riidom
Citizen
Posts: 74
Joined: Wed Jun 19, 2013 4:28 pm
Location: irgendwo an der Elbe
Contact:

Re: Cyrillic not being decoded properly

Post by riidom »

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"
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Cyrillic not being decoded properly

Post by Robin »

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.
CGNick
Prole
Posts: 2
Joined: Wed Jun 26, 2013 10:11 am

Re: Cyrillic not being decoded properly

Post by CGNick »

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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Cyrillic not being decoded properly

Post by bartbes »

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..
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests