12
« on: February 14, 2011, 02:17:11 am »
I haven't had any luck with this, and tried everything:
#include <SFML/Graphics.hpp>
int main(int argc, char *argv[])
{
sf::RenderWindow MyWindow;
// MyWindow.Create(sf::VideoMode(800, 600), "ááá"); // Appears "Ä¡Ä¡Ä¡
// sf::Unicode::Text Titlebar("ááá");
// MyWindow.Create(sf::VideoMode(800, 600), Titlebar); // Blank title
// sf::Unicode::Text Titlebar(L"ááá"); // Note the L
// MyWindow.Create(sf::VideoMode(800, 600), Titlebar); // Blank title as well
std::string caption = "ááá", destAnsi;
sf::Unicode::UTF32String cap32;
sf::Unicode::UTF8ToUTF32(caption.begin(), caption.end(), cap32.begin());
sf::Unicode::UTF32ToANSI(cap32.begin(), cap32.end(), destAnsi.begin()); // Gets frozen!!
MyWindow.Create(sf::VideoMode(800, 600), destAnsi);
while(MyWindow.IsOpened()){
sf::Event Event;
while(MyWindow.GetEvent(Event)){
if(Event.Type == sf::Event::Closed){
MyWindow.Close();
}
}
MyWindow.Clear();
MyWindow.Display();
}
return 0;
}