str_printf does not support unicode

Posted By: Talemon

str_printf does not support unicode - 06/03/14 18:19

Hello,
I'm sorry to find out that str_printf() does not support unicode strings and destroys them badly.
Posted By: jcl

Re: str_printf does not support unicode - 06/04/14 10:17

str_printf is not for unicode. But you can just add the result to an unicode string with str_cat. The manual says that str_cat requires strings of the same type, but I believe it can add ASCII to Unicode - just try it.
Posted By: Talemon

Re: str_printf does not support unicode - 06/04/14 11:42

Originally Posted By: jcl
str_printf is not for unicode. But you can just add the result to an unicode string with str_cat. The manual says that str_cat requires strings of the same type, but I believe it can add ASCII to Unicode - just try it.


Oh, I see. My problem is when dealing with numbers that you can't store in vars, i.e. large numbers. Currently, you can't directly print out to a unicode string. I did end up with the same solution as you suggested but this way, you need to create another string.

Thanks for the response!
© 2024 lite-C Forums