Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Septimium

Pages: [1]
1
General / Re: Unicode encoding
« on: May 05, 2014, 05:18:17 am »
Well . . . i fell into the trap, thank you it's now working.

2
General / Unicode encoding
« on: May 05, 2014, 03:35:25 am »
Hello, (sorry for my poor english)

I have a "problem" while trying to get a character from my keyboard, I use this:
Quote
event.text.unicode
to retreive it, but after that I don't know how to convert it into ascii.

I searched and saw some methods to do it, but no one work for me.

I tried a lot of things, like simply cast it into a char or pass by a sf::string ... etc, and nothing worked.


Characters typed on my keyboard are stocked into a std::string, and then I just want to display this string by a sf::text

Quote
std::string s = "";

//event keypressed
s += event.text.unicode;

//In my rendering thread
sf::Text text;
text.setString(s);
window->draw(text);

Could someone give me the missing line to convert my unicode string into a displayable string ?

Thank you :) (and again, sorry for my english)

Pages: [1]
anything