summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/Library_hsqldb.mk1
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx11
2 files changed, 3 insertions, 9 deletions
diff --git a/connectivity/Library_hsqldb.mk b/connectivity/Library_hsqldb.mk
index 37655e7b8d31..3c26517e16d4 100644
--- a/connectivity/Library_hsqldb.mk
+++ b/connectivity/Library_hsqldb.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_Library_use_libraries,hsqldb,\
sal \
tl \
utl \
+ i18nisolang1 \
$(gb_UWINAPI) \
))
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 193adbbf9247..5e31646f60f5 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -50,6 +50,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include "resource/hsqldb_res.hrc"
#include "resource/sharedresources.hxx"
+#include <i18npool/languagetag.hxx>
#include <o3tl/compat_functional.hxx>
@@ -862,15 +863,7 @@ namespace connectivity
{
rtl_Locale* pProcessLocale = NULL;
osl_getProcessLocale( &pProcessLocale );
-
- ::rtl::OUStringBuffer aProcLocale;
- aProcLocale.append( pProcessLocale->Language->buffer, pProcessLocale->Language->length );
- if ( pProcessLocale->Country->length )
- {
- aProcLocale.appendAscii( "-" );
- aProcLocale.append( pProcessLocale->Country->buffer, pProcessLocale->Country->length );
- }
- sLocaleString = aProcLocale.makeStringAndClear();
+ sLocaleString = LanguageTag( *pProcessLocale).getBcp47();
}
return sLocaleString;
}