From fd7ec8b8a5e9eec0347356b2126333dd840b5a73 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 28 Dec 2020 19:15:40 +0300 Subject: Use Unicode paths on Windows in libnumbertext Change-Id: I02790afc314c8633a24dbf23001f3d5cffe169b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108478 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- lingucomponent/source/numbertext/numbertext.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lingucomponent/source') diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx index dfc11a1fbb85..cb8e913bf571 100644 --- a/lingucomponent/source/numbertext/numbertext.cxx +++ b/lingucomponent/source/numbertext/numbertext.cxx @@ -100,10 +100,12 @@ void NumberText_Impl::EnsureInitialized() osl::FileBase::getSystemPathFromFileURL(aURL, aPhysPath); #ifdef _WIN32 aPhysPath += "\\"; + const rtl_TextEncoding eEnc = RTL_TEXTENCODING_UTF8; #else aPhysPath += "/"; + const rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); #endif - OString path = OUStringToOString(aPhysPath, osl_getThreadTextEncoding()); + OString path = OUStringToOString(aPhysPath, eEnc); m_aNumberText.set_prefix(path.getStr()); } -- cgit