From 57f59026216c2ea4ff8c080c7301292dcb69001b Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 16 Jan 2000 22:54:39 +0000 Subject: [PATCH]
 environment uses charset conversion as well

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/html/m_pre.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp
index 5e3a4ae9da..f4999ee76b 100644
--- a/src/html/m_pre.cpp
+++ b/src/html/m_pre.cpp
@@ -29,6 +29,7 @@
 
 #include "wx/html/htmlcell.h"
 #include "wx/tokenzr.h"
+#include "wx/encconv.h"
 
 FORCE_LINK_ME(m_pre)
 
@@ -138,8 +139,11 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
 
         {
             wxString cit;
+            wxEncodingConverter *encconv = m_WParser -> GetEncodingConverter();
             cit = m_WParser -> GetSource() -> Mid(tag.GetBeginPos(), tag.GetEndPos1() - tag.GetBeginPos());
-            c -> InsertCell(new wxHtmlPRECell(cit, *(m_WParser -> GetDC())));
+            c -> InsertCell(new wxHtmlPRECell(
+                                encconv ? encconv -> Convert(cit) : cit,
+                                *(m_WParser -> GetDC())));
         }
 
         m_WParser -> SetFontUnderlined(underlined);
-- 
2.45.2