Update of /cvsroot/mahogany/M/src/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8318/src/modules
Modified Files:
BareBonesEditor.cpp
Log Message:
removed encoding conversion code, this is now done in the composer itself
Index: BareBonesEditor.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/BareBonesEditor.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -b -u -2 -r1.35 -r1.36
--- BareBonesEditor.cpp 11 Oct 2004 00:28:45 -0000 1.35
+++ BareBonesEditor.cpp 16 Nov 2004 00:33:23 -0000 1.36
@@ -64,5 +64,4 @@
extern const MPersMsgBox *M_MSGBOX_FORMAT_PARAGRAPH_BEFORE_EXIT;
-extern const MPersMsgBox *M_MSGBOX_LANG_CHANGED_WARN;
extern const MPersMsgBox *M_MSGBOX_REMOVE_ALL_ATTACH;
@@ -1224,6 +1223,4 @@
m_getNextAttachement = 0;
- wxString text;
-
#if wxUSE_WCHAR_T && defined(OS_WIN)
wxFontEncoding encPart = wxFONTENCODING_SYSTEM;
@@ -1253,11 +1250,4 @@
}
- // if we hadn't had any user-specified encoding before, use the one we just
- // found
- if ( m_encoding == wxFONTENCODING_SYSTEM )
- {
- m_encoding = encPart;
- }
-
if ( encPart != wxFONTENCODING_SYSTEM )
{
@@ -1266,67 +1256,8 @@
// and drop any characters it can't convert)
SetFontEncoding(encPart);
-
- text = m_textControl->GetValue();
-
- // we now know that we have the text in encoding encPart but that we want
- // to send it out as m_encoding -- do we need to convert?
- if ( encPart != m_encoding )
- {
- if ( encPart == wxFONTENCODING_UTF8 ||
- m_encoding == wxFONTENCODING_UTF8 )
- {
- // here encPart may only be UTF8 if more than one encoding or an
- // unknown encoding was used, in either case we can't convert the
- // text to a single non-Unicode charset, so use UTF8 as is
- //
- // of course, if it is m_encoding which is UTF8 we wanted to use it
- // anyhow
- text = wxConvUTF8.cWC2MB(wbuf);
- encPart = wxFONTENCODING_UTF8;
}
- else // 2 multibyte encodings
- {
- text = wxCSConv(encPart).cWC2MB(wbuf);
- if ( encPart != m_encoding )
- {
- // is it possible to convert to the desired encoding?
- wxEncodingConverter conv;
- if ( wxEncodingConverter::GetAllEquivalents(encPart).
- Index(m_encoding) != wxNOT_FOUND &&
- conv.Init(encPart, m_encoding) )
- {
- // yes, do it
- text = conv.Convert(text);
- encPart = m_encoding;
- }
- else // impossible to convert to the specified encoding
- {
- // tell the user about it
- //
- // TODO: allow cancelling?
- MDialog_Message
- (
- wxString::Format
- (
- _("The selected language \"%s\" can't be used to "
- "send this message, \"%s\" will be used instead."),
- wxFontMapper::GetEncodingName(m_encoding).c_str(),
- wxFontMapper::GetEncodingName(encPart).c_str()
- ),
- m_notebook,
- M_MSGBOX_LANG_CHANGED_WARN
- );
- }
- }
- }
- }
- }
- else // ASCII only, no problems
#endif // wxUSE_WCHAR_T
- {
- text = m_textControl->GetValue();
- }
-
+ wxString text = m_textControl->GetValue();
// Translate LF to CRLF. All internal strings should have only LF, but
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates