summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-08-26 13:07:19 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-08-26 13:07:19 +0200
commit44d336c3ab01c2261297f2a2f773a9fcc30c5545 (patch)
treeed3ae15ce36ddd48b2c57e933f2324771a15fdfb /editeng
parent7abb5e2be8fe2d89fbd40fa4453ad8a359262134 (diff)
parent2f61a21f70c9dc5efa8d0e0a54e06da282a68efb (diff)
CWS-TOOLING: integrate CWS fwk152
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/eehtml.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 569b80639b6b..e8a2aaad22e2 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -43,7 +43,7 @@
#include <editeng/wghtitem.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-
+#include <tools/tenccvt.hxx>
#define ACTION_INSERTTEXT 1
#define ACTION_INSERTPARABRK 2
@@ -66,6 +66,16 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu
nNumberingLevel = 0;
bFieldsInserted = FALSE;
+ DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" );
+ DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParser::::EditHTMLParser: Switch to UCS2?" );
+
+ // Altough the real default encoding is ISO8859-1, we use MS-1252
+ // als default encoding.
+ SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
+
+ // If the file starts with a BOM, switch to UCS2.
+ SetSwitchToUCS2( TRUE );
+
if ( pHTTPHeaderAttrs )
SetEncodingByHTTPHeader( pHTTPHeaderAttrs );
}