I debuged the mod_wxjs and i found, that the bug is in class ApacheTable. Because the value from javascript is "char *" and it converts to "wxString" throught the method "FromASCII". ASCII is not good the "char * value" can be in other encodings f.e. UTF-8, Windows CP1250 and others. I made simple path that is not the best but it works fine.
Does this also occur with 0.9.75?
I debuged the mod_wxjs and i found, that the bug is in class ApacheTable. Because the value from javascript is "char *" and it converts to "wxString" throught the method "FromASCII". ASCII is not good the "char * value" can be in other encodings f.e. UTF-8, Windows CP1250 and others. I made simple path that is not the best but it works fine.
In file table.cpp:
bool AprTable::GetStringProperty(apr_table_t *p, JSContext *cx, JSObject *WXUNUSED(obj), const wxString &propertyName, jsval *vp)
{
const char *value = apr_table_get(p, propertyName.ToAscii());
if ( value != NULL )
{
wxString valuestr = wxString::FromUTF8(value);
if (valuestr.Len() == 0) {
wxCSConv conv(wxFONTENCODING_CP1250);
valuestr = wxString(value,conv);
}
*vp = ToJS(cx,valuestr );
}
return true;
}