Update of /cvsroot/mahogany/M/src/modules
In directory usw-pr-cvs1:/tmp/cvs-serv29049/src/modules
Modified Files:
HtmlViewer.cpp TextViewer.cpp
Log Message:
fixed UTF-7,8 support for html and text viewers
Index: HtmlViewer.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/HtmlViewer.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -b -u -2 -r1.31 -r1.32
--- HtmlViewer.cpp 16 Apr 2002 16:03:17 -0000 1.31
+++ HtmlViewer.cpp 16 Apr 2002 16:47:57 -0000 1.32
@@ -726,9 +726,9 @@
void HtmlViewer::ShowHeader(const String& headerName,
- const String& headerValue,
+ const String& headerValueOrig,
wxFontEncoding encHeader)
{
// don't show empty headers at all
- if ( headerValue.empty() )
+ if ( headerValueOrig.empty() )
return;
@@ -741,4 +741,5 @@
}
+ String headerValue = headerValueOrig;
const ProfileValues& profileValues = GetOptions();
@@ -756,12 +757,11 @@
m_htmlText += "</td><td>";
- if ( encHeader == wxFONTENCODING_UTF8 || encHeader == wxFONTENCODING_UTF7)
+ {
+ if ( encHeader == wxFONTENCODING_UTF8 || encHeader == wxFONTENCODING_UTF7 )
{
// convert from UTF-8|7 to environment's default encoding
// FIXME it won't be needed when full Unicode support is available
- encHeader = ConvertUnicodeToSystem(&m_htmlText, encHeader ==
wxFONTENCODING_UTF7);
+ encHeader = ConvertUnicodeToSystem(&headerValue, encHeader ==
+wxFONTENCODING_UTF7);
}
-
- {
FontColourChanger colChanger(profileValues.HeaderValueCol, m_htmlText);
Index: TextViewer.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/TextViewer.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -b -u -2 -r1.25 -r1.26
--- TextViewer.cpp 18 Jan 2002 20:08:40 -0000 1.25
+++ TextViewer.cpp 16 Apr 2002 16:47:57 -0000 1.26
@@ -485,10 +485,11 @@
void TextViewer::ShowHeader(const String& headerName,
- const String& headerValue,
+ const String& headerValueOrig,
wxFontEncoding encHeader)
{
- if ( headerValue.empty() )
+ if ( headerValueOrig.empty() )
return;
+ String headerValue = headerValueOrig;
const ProfileValues& profileValues = GetOptions();
@@ -502,4 +503,10 @@
if ( encHeader != wxFONTENCODING_SYSTEM )
{
+ if ( encHeader == wxFONTENCODING_UTF8 || encHeader == wxFONTENCODING_UTF7 )
+ {
+ // convert from UTF-8|7 to environment's default encoding
+ // FIXME it won't be needed when full Unicode support is available
+ encHeader = ConvertUnicodeToSystem(&headerValue, encHeader ==
+wxFONTENCODING_UTF7);
+ }
wxFont font = profileValues.GetFont(encHeader);
attr.SetFont(font);
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates