SFML community forums

Help => Graphics => Topic started by: dvoid on February 09, 2011, 03:25:25 pm

Title: SFML 2 image::SaveToFile does not support utf8?
Post by: dvoid on February 09, 2011, 03:25:25 pm
im trying to use image::SaveToFile with an utf8 encoded string, but it fails. im guessing its not supported? would be nice with a FILE* version of SaveToFile. and maybe a SaveToMemory =)
Title: SFML 2 image::SaveToFile does not support utf8?
Post by: Laurent on February 09, 2011, 03:44:27 pm
UTF-8 filenames will most likely be supported in SFML 2.

Abstract data access for resources may also be implemented one day.

For now you can just convert your UTF-8 string manually before calling SaveToFile.
Title: SFML 2 image::SaveToFile does not support utf8?
Post by: dvoid on February 09, 2011, 03:58:25 pm
what do you mean convert it manually?
it is already in utf8 format? what should i convert it to?

i need to be able to save files to the users home directory , which is a unicode
path encoded in utf8  ( that is a non wide string ) .
Title: SFML 2 image::SaveToFile does not support utf8?
Post by: Laurent on February 09, 2011, 05:05:51 pm
I don't have much control on the third-party libraries that I use for image loading/saving, but I guess they yse the current global locale's encoding.