While export to tex under WinXp with chinese enviroment, some of the chinese characters are destroyed by strings replaced procedure within GroupCell::PrepareForTeX.
This kind of error may occurs in CJK two-bytes encoding enviroments, under which the second byte of a character being replaced by other character inside GroupCell::PrepareForTeX.
.
I have fixed this problem in my working copy of wxMaximax, with following patch, hope this bug been fixed in the next version.
------- recommend modification----
wxString GroupCell::PrepareForTeX(wxString str1)
{
wxString str(str1.wcstr(wxConvLocal), wxConvUTF8); //<--- change to UTF8 before String Replace
str.Replace(wxT("\"), wxT("\verb||"));
str.Replace(wxT(""), wxT("_"));
str.Replace(wxT("%"), wxT("\%"));
str.Replace(wxT("{"), wxT("{"));
str.Replace(wxT("}"), wxT("}"));
str.Replace(wxT("^"), wxT("\verb|^|"));
str.Replace(wxT(">"), wxT("\verb|>|"));
str.Replace(wxT("<"), wxT("\verb|<|"));
wxString str2(str.wc_str(wxConvUTF8),wxConvLocal ); // <----change back to local encoding
return str2;
Converted from SourceForge issue 3016554, submitted by nobody
While export to tex under WinXp with chinese enviroment, some of the chinese characters are destroyed by strings replaced procedure within GroupCell::PrepareForTeX.
This kind of error may occurs in CJK two-bytes encoding enviroments, under which the second byte of a character being replaced by other character inside GroupCell::PrepareForTeX. .
I have fixed this problem in my working copy of wxMaximax, with following patch, hope this bug been fixed in the next version.
------- recommend modification---- wxString GroupCell::PrepareForTeX(wxString str1) { wxString str(str1.wcstr(wxConvLocal), wxConvUTF8); //<--- change to UTF8 before String Replace str.Replace(wxT("\"), wxT("\verb||")); str.Replace(wxT(""), wxT("_")); str.Replace(wxT("%"), wxT("\%")); str.Replace(wxT("{"), wxT("{")); str.Replace(wxT("}"), wxT("}")); str.Replace(wxT("^"), wxT("\verb|^|")); str.Replace(wxT(">"), wxT("\verb|>|")); str.Replace(wxT("<"), wxT("\verb|<|")); wxString str2(str.wc_str(wxConvUTF8),wxConvLocal ); // <----change back to local encoding return str2;
}