but the question is why does it work in the first place?
and also in the debugger i can see that c_str returns the characters 
with umlauts  :/ ( even on the not working label )

Jonas 'Sortie' Termansen schrieb:
> std::string::c_str() returns exactly what it says, a 8-bit ascii (UTF-8) 
> string, which of course doesn't have any unicode support, because it's 
> acsii. Get a wide character string pointer and use that one instead with a 
> function that supports it.
>
> - Sortie.
>
> ----- Original Message ----- 
> From: "Heimo Stieg" <[email protected]>
> To: "hlcoders" <[email protected]>
> Sent: Sunday, June 07, 2009 1:27 PM
> Subject: [hlcoders] GoldSrc vgui::Label unicode problem
>
>
>   
>> Hi,
>> I want to add unicode to the normal ingame chat. On my custom input
>> label ( vgui::Label ) the characters are looking fine and everything is
>> working.
>> On the other hand i have also some vgui::Labels to display the chat, but
>> on these labels unicode characters like german umlauts will screw up.
>> Sometimes the labels won't draw any character after the unicode one( the
>> unicode character will be drawn ), or the labels writing the text over
>> the unicode characters( like these characters would have the width of 0 ).
>> I'm storing everything in std::string. I change also only this variable
>> and on label->SetText im just using std::string::c_str().
>> The error isn't somewhere in the network because i've also tryed to copy
>> the text directly from the input label to the chat label on the same
>> client. Result is the same :/
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives, 
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>     
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>   

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to