diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-10 18:55:52 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-10 21:24:58 +0200 |
commit | d33f5abc4423aad4087eb77c920fcbd74e34533f (patch) | |
tree | 9fe53c51c5b777ca37ef5bf564a446b1e3d03bbf | |
parent | 9f46bcac09c7f1f8ef6f22ed9f366d1fd596f9d7 (diff) |
tdf#125286: Inform Firebird that we use UTF8 in paths
Use isc_dpb_utf8_filename for that, which is introduced in Firebird 2.5.
It is documented in Firebird's doc/README.connection_string_charset.txt.
Without this, on Windows, where UTF-8 is not a common "ANSI code page",
one would not be able to connect to a DB file that has non-ASCII chars
in path, because its UTF-8 representation would differ from 8-bit system
encoding used in the API used by Firebird.
This still does not enable full Unicode support, because of Firebird's
[CORE2172]/[CORE3172]. It may only improve experience when using paths
with characters representable in system encoding.
Change-Id: Ia31407b181266a2bf1b90bc8cfc71dd3f78b7cd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121886
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | connectivity/source/drivers/firebird/Connection.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx index eb0c100b0fc1..6d38af079d1e 100644 --- a/connectivity/source/drivers/firebird/Connection.cxx +++ b/connectivity/source/drivers/firebird/Connection.cxx @@ -273,6 +273,10 @@ void Connection::construct(const OUString& url, const Sequence< PropertyValue >& } } + // use isc_dpb_utf8_filename to identify encoding of filenames + dpbBuffer.push_back(isc_dpb_utf8_filename); + dpbBuffer.push_back(0); // no filename here, it is passed to functions directly + ISC_STATUS_ARRAY status; /* status vector */ ISC_STATUS aErr; const OString sFirebirdURL = OUStringToOString(m_sFirebirdURL, RTL_TEXTENCODING_UTF8); |