summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sb@openoffice.org>2002-03-18 13:43:42 +0000
committerStephan Bergmann <sb@openoffice.org>2002-03-18 13:43:42 +0000
commita7bb1e6a2afa3b83ab6dd77e7425ffb855f96884 (patch)
treec86e356be7f9b8b2cc0ffce59f450ea70200f3c7
parentc23a3ce8530214e6a054d13733036c44e063319b (diff)
#98208# Added RTL_TEXTENCODING_TIS_620.
-rw-r--r--sal/inc/rtl/textenc.h8
-rw-r--r--sal/textenc/tcvteas1.tab56
-rw-r--r--sal/textenc/tencinfo.c9
3 files changed, 66 insertions, 7 deletions
diff --git a/sal/inc/rtl/textenc.h b/sal/inc/rtl/textenc.h
index 1cfea89d2..46b541aae 100644
--- a/sal/inc/rtl/textenc.h
+++ b/sal/inc/rtl/textenc.h
@@ -2,9 +2,9 @@
*
* $RCSfile: textenc.h,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: sb $ $Date: 2002-01-15 16:59:22 $
+ * last change: $Author: sb $ $Date: 2002-03-18 14:41:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -173,8 +173,9 @@ typedef sal_uInt16 rtl_TextEncoding;
#define RTL_TEXTENCODING_MS_1361 (RTL_TEXTENC_CAST( 84 ))
#define RTL_TEXTENCODING_GB_18030 (RTL_TEXTENC_CAST( 85 ))
#define RTL_TEXTENCODING_BIG5_HKSCS (RTL_TEXTENC_CAST( 86 ))
+#define RTL_TEXTENCODING_TIS_620 (RTL_TEXTENC_CAST( 87 ))
-#define RTL_TEXTENCODING_STD_COUNT (RTL_TEXTENC_CAST( 87 ))
+#define RTL_TEXTENCODING_STD_COUNT (RTL_TEXTENC_CAST( 88 ))
#define RTL_TEXTENCODING_USER_START (RTL_TEXTENC_CAST( 0x8000 ))
#define RTL_TEXTENCODING_USER_END (RTL_TEXTENC_CAST( 0xEFFF ))
@@ -254,6 +255,7 @@ Symbol RTL_TEXTENCODING_SYMBOL
# Thai (Apple Macintosh) RTL_TEXTENCODING_APPLE_THAI
Thai (Dos/Windows-874) RTL_TEXTENCODING_MS_874
+Thai (TIS 620) RTL_TEXTENCODING_TIS_620
Turkish (Apple Macintosh) RTL_TEXTENCODING_APPLE_TURKISH
Turkish (DOS/OS2-857) RTL_TEXTENCODING_IBM_857
diff --git a/sal/textenc/tcvteas1.tab b/sal/textenc/tcvteas1.tab
index b939c0fa0..1c5313ded 100644
--- a/sal/textenc/tcvteas1.tab
+++ b/sal/textenc/tcvteas1.tab
@@ -2,9 +2,9 @@
*
* $RCSfile: tcvteas1.tab,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: sb $ $Date: 2001-10-12 10:44:53 $
+ * last change: $Author: sb $ $Date: 2002-03-18 14:43:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -177,6 +177,58 @@ static ImplTextEncodingData const aImplMS874TextEncodingData
/* ======================================================================= */
+/* TIS 620-2533
+ *
+ * A good source of information is <http://www.inet.co.th/cyberclub/trin/
+ * thairef/index.html> as of 18 Mar 2002.
+ *
+ * Single byte encoding, from which MS874 is derived (although it is the other
+ * way around in this implementation):
+ *
+ * 0x00--9F map to U+0000--009F
+ * 0xA0 is questionable (unassigned or U+00A0 NO BREAK SPACE), to ease
+ * implementation, it maps to U+00A0
+ * 0xA1--DA map to U+0E01--0E3A (TIS 620, same for MS874)
+ * 0xDB--DE are unassigned (TIS 620, same for MS874)
+ * 0xDF--FB map to U+0E3F--0E5B (TIS 620, same for MS874)
+ * 0xFC--FF are unassigned (TIS 620, same for MS874)
+ */
+
+static ImplByteConvertData const aImplTis620ByteCvtData =
+{
+ aImplMS874ToUniTab + (0xA0 - MS874UNI_START),
+ aImpl8090SameToUniTab,
+ 0xA0, MS874UNI_END,
+ SAME8090UNI_START, SAME8090UNI_END,
+ aImplMS874ToCharTab,
+ aImpl8090SameToCharTab,
+ aImplMS874ToCharTabEx,
+ MS874CHAR_START, MS874CHAR_END,
+ SAME8090CHAR_START, SAME8090CHAR_END,
+ 1
+};
+
+static ImplTextEncodingData const aImplTis620TextEncodingData
+ = { { &aImplTis620ByteCvtData,
+ ImplCharToUnicode,
+ ImplUnicodeToChar,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL },
+ RTL_TEXTENCODING_TIS_620,
+ 1,
+ 1,
+ 1,
+ 222,
+ "iso8859-1", /* TODO! correct? */
+ "TIS-620",
+ RTL_TEXTENCODING_INFO_ASCII | RTL_TEXTENCODING_INFO_MIME };
+
+/* ======================================================================= */
+
/* MS-1258 */
/* Windows Standard CharSet for Vietnamease */
/* 1-Byte, 0x00-0x7F ASCII ohne Ausnahme */
diff --git a/sal/textenc/tencinfo.c b/sal/textenc/tencinfo.c
index cb1f1829f..1478fb4d1 100644
--- a/sal/textenc/tencinfo.c
+++ b/sal/textenc/tencinfo.c
@@ -2,9 +2,9 @@
*
* $RCSfile: tencinfo.c,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: sb $ $Date: 2002-01-15 17:00:15 $
+ * last change: $Author: sb $ $Date: 2002-03-18 14:43:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -445,6 +445,10 @@ rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromMacTextEncoding( sal_uInt32 nMa
rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset( const sal_Char* pUnixCharset )
{
+ /* See <ftp://ftp.x.org/pub/DOCS/registry>, section 14 ("Font Charset
+ * (Registry and Encoding) Names").
+ */
+
/* All Identifiers in the tables are lower case The function search */
/* for the first matching string in the tables. */
/* Sort order: unique (first 14, than 1), important */
@@ -912,6 +916,7 @@ rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromMimeCharset( const sal_Char* pM
{ "gb18030", RTL_TEXTENCODING_GB_18030 },
/* This is no actual MIME character set name, it's only a guess */
{ "big5hkscs", RTL_TEXTENCODING_BIG5_HKSCS },
+ { "tis620", RTL_TEXTENCODING_TIS_620 },
{ NULL, RTL_TEXTENCODING_DONTKNOW }
};