[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Wed Apr 27 16:07:01 UTC 2016
sc/source/core/data/global.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 0445de5e0d9bccd7634911ca3547c0e14f4f47c5
Author: Eike Rathke <erack at redhat.com>
Date: Wed Apr 27 18:02:08 2016 +0200
accept UTF8 as explicit charset value
... to follow the (wrong) docs on the net.. it doesn't harm.
Change-Id: I30c34edb6dc1c56084625de8e52bfb5afe82fcf7
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index e9df005..b878817 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -676,6 +676,11 @@ rtl_TextEncoding ScGlobal::GetCharsetValue( const OUString& rCharSet )
else if (rCharSet.equalsIgnoreAsciiCase("IBMPC_861")) return RTL_TEXTENCODING_IBM_861;
else if (rCharSet.equalsIgnoreAsciiCase("IBMPC_863")) return RTL_TEXTENCODING_IBM_863;
else if (rCharSet.equalsIgnoreAsciiCase("IBMPC_865")) return RTL_TEXTENCODING_IBM_865;
+ // Some wrong "help" on the net mentions UTF8 and even unoconv uses it,
+ // which worked accidentally if the system encoding is UTF-8 anyway, so
+ // support it ;) but only when reading.
+ else if (rCharSet.equalsIgnoreAsciiCase("UTF8")) return RTL_TEXTENCODING_UTF8;
+ else if (rCharSet.equalsIgnoreAsciiCase("UTF-8")) return RTL_TEXTENCODING_UTF8;
else return osl_getThreadTextEncoding();
}
More information about the Libreoffice-commits
mailing list