]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_layout.cpp
FM small patch for wxDataViewCtrl compilation
[wxWidgets.git] / src / html / m_layout.cpp
index f8f5c34931c592efba7be615dedb3fbf8f981800..4986a9f649de6a34d14843fbfda79ee2a1ad47ca 100644 (file)
@@ -293,9 +293,14 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
                                     tag.GetBeginPos(),
                                     tag.GetEndPos1()-tag.GetBeginPos());
 #if !wxUSE_UNICODE && wxUSE_WCHAR_T
-            wxCSConv conv(m_WParser->GetInputEncoding());
-            title = wxString(title.wc_str(conv), wxConvLocal);
-#endif
+            const wxFontEncoding enc = m_WParser->GetInputEncoding();
+            if ( enc != wxFONTENCODING_DEFAULT )
+            {
+                // need to convert to the current one
+                title = wxString(title.wc_str(wxCSConv(enc)), wxConvLocal);
+            }
+#endif // !wxUSE_UNICODE
+
             title = m_WParser->GetEntitiesParser()->Parse(title);
 
             winIface->SetHTMLWindowTitle(title);