Locale issue when exporting urectToString

Create issue
Issue #104 resolved
Former user created an issue

Automatic migration. Original reporter: "Dalfy"

http://www.cegui.org.uk/phpBB2/viewtopic.php?p=8891#8891 Hey mba,

now i am pretty much stuck on the XML issue. It has nothing to do with wxWidgets btw, sorry for suggesting that. When writing xml, that string value is generated in CEGUI as follows:

Code: String PropertyHelper::urectToString(const URect& val) { using namespace std;

char buff[512]; sprintf( buff, "%f,%f},{%f,%f},{%f,%f},{%f,%f", val.d_min.d_x.d_scale,val.d_min.d_x.d_offset, val.d_min.d_y.d_scale,val.d_min.d_y.d_offset, val.d_max.d_x.d_scale,val.d_max.d_x.d_offset, val.d_max.d_y.d_scale,val.d_max.d_y.d_offset );

return String((utf8*)buff); }

I can only guess that the printf familily does localization. But that's hard to believe since i only found some very specific topics on google, and they are not even for sprintf but rather printf:

Reproducibility: always

Additional information: This problem can be solve using setlocale (C) or the corresponding methode of the C++ API as it is for most property helper. I need to check helper function and use a single style.

Comments (0)

  1. Log in to comment