Character encoding problem STDCPP

Monkey Forums/Monkey Bug Reports/Character encoding problem STDCPP

FJSoler(Posted 2013) [#1]
Anyone could help me to display latin/spanish characters in a STDCPP application?

When I use the Print command:
Print "Mindcast (R) Utilidad de conversión de archivos PNG a SPR versión 0.1"

I get this in the console:
"Mindcast (R) Utilidad de conversi¾n de archivos PNG a SPR versi¾n 0.1"

Thanks in advance!


ziggy(Posted 2013) [#2]
I don't know how to fix it but it looks like a weird encoding issue. maybe taking a look to the print command implementation in cpp can add some light?


AdamRedwoods(Posted 2013) [#3]
I think Monkey STDCPP uses ASCII internally, and there is no ascii->UTF8 conversion done for the Print() function.
Monkey however will convert UTF-8 to ascii bytes in it's LoadString().

In the standard monkey lang for STDCPP, there's a little converter that seems to work, so copy this code into the Print() function:
in Monkey/modules/monkey/native/lang.cpp


Plus, I think the compiler would also need to be aware of unicode to inform the console appropriately to use it (Ted and Monk do this automatically).


ziggy(Posted 2013) [#4]
I think this should be placed as a bug report


AdamRedwoods(Posted 2013) [#5]
I think this should be placed as a bug report

true.


DruggedBunny(Posted 2013) [#6]

I think this should be placed as a bug report


Hold on to your hats! There we go...