diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-11-08 08:02:04 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-11-08 08:02:04 +0000 |
commit | d10fbccab3a049ac58fb147821f030b3f6be021e (patch) | |
tree | ee0880d6b0a0cd4cefbe053095c0eba78346251c /lingucomponent/source | |
parent | e66310b728be2a9f2d763ebecf44b66cdb77e8c3 (diff) |
INTEGRATION: CWS textconversion (1.3.32); FILE MERGED
2005/10/24 08:06:40 tl 1.3.32.1: #54268# UTF-8 support added
Diffstat (limited to 'lingucomponent/source')
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 89ab7f2fc340..0c062059f8d0 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -4,9 +4,9 @@ * * $RCSfile: nthesimp.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: rt $ $Date: 2005-09-07 19:44:28 $ + * last change: $Author: rt $ $Date: 2005-11-08 09:02:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -357,13 +357,20 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL OString aTmpdat(OU2ENC(ndat,osl_getThreadTextEncoding())); aThes[i] = new MyThes(aTmpidx.getStr(),aTmpdat.getStr()); if (aThes[i]) { - const char * enc_string = aThes[i]->get_th_encoding(); - if (enc_string) { - aTEncs[i] = rtl_getTextEncodingFromUnixCharset(enc_string); - } else { - aTEncs[i] = rtl_getTextEncodingFromUnixCharset("ISO8859-1"); - } - } + const char * enc_string = aThes[i]->get_th_encoding(); + if (!enc_string) { + aTEncs[i] = rtl_getTextEncodingFromUnixCharset("ISO8859-1"); + } else { + aTEncs[i] = rtl_getTextEncodingFromUnixCharset(enc_string); + if (aTEncs[i] == RTL_TEXTENCODING_DONTKNOW) { + if (strcmp("ISCII-DEVANAGARI", enc_string) == 0) { + aTEncs[i] = RTL_TEXTENCODING_ISCII_DEVANAGARI; + } else if (strcmp("UTF-8", enc_string) == 0) { + aTEncs[i] = RTL_TEXTENCODING_UTF8; + } + } + } + } } pTH = aThes[i]; aEnc = aTEncs[i]; |