Page 1 of 1
Wrong logic in wxHtmlWindow?
Posted: Thu Sep 15, 2005 9:52 am
by Vaulter
i write this code:
Code: Select all
//assume that's wxFrame child class...
wxHtmlWindow* myhtml = new wxHtmlWindow(this);
myhtml->SetInputEncoding(wxFONTENCODING_CP1251);
myhtml->AppendToPage("<center>!!!some this in cyrilic (
Posted: Thu Sep 15, 2005 10:01 am
by upCASE
Hi!
The logic is quite correct. You forgot to quote one important ifdef block:
Code: Select all
#if !wxUSE_UNICODE
SetInputEncoding(wxFONTENCODING_ISO8859_1); // for next call
#endif
So, using the control your way in a unicode build should work correctly. Otherwise it will reset the encoding. Try again with a unicode build.
Posted: Thu Sep 15, 2005 10:05 am
by Vaulter
now i use this code to pass this problem
Code: Select all
class HtmlChatBox : public wxHtmlWindow
{
bool HtmlChatBox::SetPage(wxString& source)
{
m_Parser->SetInputEncoding(wxFONTENCODING_CP1251);
return wxHtmlWindow::SetPage(source);
}
}
Posted: Thu Sep 15, 2005 10:10 am
by Vaulter
upCASE wrote:Hi!
The logic is quite correct. You forgot to quote one important ifdef block:
So, using the control your way in a unicode build should work correctly. Otherwise it will reset the encoding. Try again with a unicode build.
but i am not using Unicode and do not want and do not on the point of using it.
if use UNICODE - problem of encoding dosn't appear at a whole
ps: sorry for poor English
wRespect, Vaulter