[wx-dev] wxCSConv assert on wxFONTENCODING_DEFAULT from
wxHtmlWindow
Vadim Zeitlin
vadim at wxwindows.org
Sat Sep 2 16:32:03 PDT 2006
On Mon, 28 Aug 2006 13:25:33 -0400 John Labenski <jlabenski at gmail.com> wrote:
JL> wxWidgets CVS 2.6.x, built with MSVC 2005, ansi, debug, default setup.h file.
I suspect it would be the same thing with cvs HEAD.
JL> The call is made from m_layout.cpp
JL>
JL> bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, int*
JL> known_pagebreaks, int number_of_pages) const
JL> {
JL> ...
JL> TAG_HANDLER_BEGIN(TITLE, "TITLE")
JL> ...
JL> #if !wxUSE_UNICODE && wxUSE_WCHAR_T
JL> wxCSConv conv(m_WParser->GetInputEncoding());
JL> title = wxString(title.wc_str(conv), wxConvLocal);
JL> #endif
I think we don't need the conversion if input encoding is
wxFONTENCODING_DEFAULT. I've just changed it in HEAD, let's see if this
creates any new problems.
JL> Here's the header for the HTML file, there's nothing special in the
JL> rest of it.
JL>
JL> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
JL> <meta name="generator" content=
JL> "HTML Tidy for Linux/x86 (vers 1st December 2004), see www.w3.org">
JL> <meta content="text/html; charset=us-ascii" http-equiv="content-type">
JL> ...
The real problem is that US-ASCII is mapped to wxFONTENCODING_DEFAULT, of
course. If you change the charset to ISO-8859-anything or UTF-8 (both
supersets of US-ASCII) everything should work correctly so this could be a
workaround for now.
Regards,
VZ
More information about the wx-dev
mailing list