summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2011-12-16 20:41:02 +0530
committerMuthu Subramanian <sumuthu@suse.com>2011-12-16 20:45:25 +0530
commitb00c4ec0967f8712d721b31ccb2dd0778c9e973b (patch)
tree818e5a1aa1d2183b0c2403334146a5c055c3cb3e
parent6de6fcefdef8d03318bf431a2f650bbe80b9753e (diff)
Adding more dbf file types.
Uses info from comments in i18728.
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx11
-rw-r--r--sc/source/ui/docshell/docsh8.cxx4
2 files changed, 15 insertions, 0 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 7200ac2da2eb..5e5b9e2b46ae 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -268,6 +268,14 @@ void ODbaseTable::readHeader()
//case 0x69: m_eEncoding = ; break; // Mazovia (Polish) MS-DOS
case 0x6A: m_eEncoding = RTL_TEXTENCODING_IBM_737; break; // Greek MS-DOS (437G)
case 0x6B: m_eEncoding = RTL_TEXTENCODING_IBM_857; break; // Turkish MS-DOS
+ case 0x6C: m_eEncoding = RTL_TEXTENCODING_IBM_863; break; // MS-DOS, Canada
+ case 0x78: m_eEncoding = RTL_TEXTENCODING_MS_950; break; // Windows, Traditional Chinese
+ case 0x79: m_eEncoding = RTL_TEXTENCODING_MS_949; break; // Windows, Korean (Hangul)
+ case 0x7A: m_eEncoding = RTL_TEXTENCODING_MS_936; break; // Windows, Simplified Chinese
+ case 0x7B: m_eEncoding = RTL_TEXTENCODING_MS_932; break; // Windows, Japanese (Shift-jis)
+ case 0x7C: m_eEncoding = RTL_TEXTENCODING_MS_874; break; // Windows, Thai
+ case 0x7D: m_eEncoding = RTL_TEXTENCODING_MS_1255; break; // Windows, Hebrew
+ case 0x7E: m_eEncoding = RTL_TEXTENCODING_MS_1256; break; // Windows, Arabic
case 0x96: m_eEncoding = RTL_TEXTENCODING_APPLE_CYRILLIC; break; // Russian Macintosh
case 0x97: m_eEncoding = RTL_TEXTENCODING_APPLE_CENTEURO; break; // Eastern European Macintosh
case 0x98: m_eEncoding = RTL_TEXTENCODING_APPLE_GREEK; break; // Greek Macintosh
@@ -275,7 +283,10 @@ void ODbaseTable::readHeader()
case 0xC9: m_eEncoding = RTL_TEXTENCODING_MS_1251; break; // Russian Windows
case 0xCA: m_eEncoding = RTL_TEXTENCODING_MS_1254; break; // Turkish Windows
case 0xCB: m_eEncoding = RTL_TEXTENCODING_MS_1253; break; // Greek Windows
+ case 0xCC: m_eEncoding = RTL_TEXTENCODING_MS_1257; break; // Windows, Baltic
default:
+ // Default Encoding
+ m_eEncoding = RTL_TEXTENCODING_IBM_850;
break;
}
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 5529579f297b..207f0f039de9 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -309,6 +309,10 @@ sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet
long i;
long nColCount = 0;
+ // Try to get the Text Encoding from the driver
+ if( eCharSet == RTL_TEXTENCODING_IBM_850 )
+ eCharSet = RTL_TEXTENCODING_DONTKNOW;
+
try
{
String aTabName;