]> source.dussan.org Git - nextcloud-server.git/commitdiff
enable UTF-8 charset on mssql
authorThomas Mueller <thomas.mueller@tmit.eu>
Tue, 12 Mar 2013 14:33:37 +0000 (15:33 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Tue, 12 Mar 2013 14:39:44 +0000 (15:39 +0100)
disable MDB2_PORTABILITY_EMPTY_TO_NULL for mssql to allow insert of empty string to no null fields

lib/db.php

index 347deac8519db437a91fa4c9b6aebcc7e0733f02..9699b216f6f712d71bdebac6baa627045806aa6f 100644 (file)
@@ -292,8 +292,10 @@ class OC_DB {
                                                'username' => $user,
                                                'password' => $pass,
                                                'hostspec' => $host,
-                                               'database' => $name
-                                       );                    
+                                               'database' => $name,
+                                               'charset' => 'UTF-8'
+                                       );
+                                       $options['portability'] = $options['portability'] - MDB2_PORTABILITY_EMPTY_TO_NULL;
                                        break;
                                default:
                                        return false;