IMG_Load requiring UTF8 for special characters |
IMG_Load requiring UTF8 for special characters |
Rainer Deyke
Guest
|
On 17.07.2014 11:23, Ande wrote:
No, this never worked. You just got lucky. Just try putting a file named Παν語.png in the directory and watch it crash and burn. -- Rainer Deyke _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
IMG_Load requiring UTF8 for special characters |
Ryan C. Gordon
Guest
|
To be more clear, you probably didn't have an ASCII string, you probably had a Latin1 string (that is, you probably had something that was alphanumeric English characters and maybe something with an accent over it?). You can convert between this and UTF-8 with SDL_iconv()...just be careful, those accented chars will probably grow from 1 byte to 2 bytes (and if you get into some languages, they might be 4 bytes). Alternately, Low ASCII (basically, unaccented English letters and numbers and punctuation) happens to be valid UTF-8, so if you control your file names, just rename them appropriately and your existing code will work without drama. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|