Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
SFML 2 image::SaveToFile does not support utf8?
Print
Pages: [
1
]
Author
Topic: SFML 2 image::SaveToFile does not support utf8? (Read 2233 times)
0 Members and 1 Guest are viewing this topic.
dvoid
Newbie
Posts: 7
SFML 2 image::SaveToFile does not support utf8?
«
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 =)
Logged
Laurent
Administrator
Hero Member
Posts: 32498
SFML 2 image::SaveToFile does not support utf8?
«
Reply #1 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.
Logged
Laurent Gomila - SFML developer
dvoid
Newbie
Posts: 7
SFML 2 image::SaveToFile does not support utf8?
«
Reply #2 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 ) .
Logged
Laurent
Administrator
Hero Member
Posts: 32498
SFML 2 image::SaveToFile does not support utf8?
«
Reply #3 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.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
SFML 2 image::SaveToFile does not support utf8?