[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - connectivity/source

Tamás Bunth btomi96 at gmail.com
Thu Feb 2 12:53:35 UTC 2017


 connectivity/source/drivers/firebird/Connection.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit fb72da075f20403008207fba0a6c36e808ffa3b1
Author: Tamás Bunth <btomi96 at gmail.com>
Date:   Sun Jan 29 16:20:57 2017 +0100

    tdf#105142 set default charset to UTF8
    
    Change-Id: I47dd18a141949f94903297f6e011e7956587b400
    Reviewed-on: https://gerrit.libreoffice.org/33663
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    (cherry picked from commit 1db423338899c71ba70e361af339d7b7e4aff61f)
    Reviewed-on: https://gerrit.libreoffice.org/33809
    Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 54ee5ef..e26c8a6 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)


More information about the Libreoffice-commits mailing list