summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 54ee5efdd7c9..e26c8a6eeaf8 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -241,7 +241,7 @@ void Connection::construct(const ::rtl::OUString& url, const Sequence< PropertyV
}
}
- char dpbBuffer[1 + 3 + 257 + 257 ]; // Expand as needed
+ char dpbBuffer[1 + 3 + 257 + 257 + 5 ]; // Expand as needed
int dpbLength = 0;
{
char* dpb;
@@ -254,6 +254,15 @@ void Connection::construct(const ::rtl::OUString& url, const Sequence< PropertyV
*dpb++ = isc_dpb_sql_dialect;
*dpb++ = 1; // 1 byte long
*dpb++ = FIREBIRD_SQL_DIALECT;
+
+ // set UTF8 as default character set
+ const char sCharset[] = "UTF8";
+ *dpb++ = isc_dpb_set_db_charset;
+ int nCharsetLength = sizeof(sCharset) - 1;
+ *dpb++ = (char) nCharsetLength;
+ strcpy(dpb, sCharset);
+ dpb+= nCharsetLength;
+
// Do any more dpbBuffer additions here
if (m_bIsEmbedded || m_bIsFile)