]> git.wh0rd.org Git - tt-rss.git/commitdiff
mobile: fix mysql charset
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 26 Aug 2007 10:51:17 +0000 (11:51 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 26 Aug 2007 10:51:17 +0000 (11:51 +0100)
mobile/tt-rss.php

index 637e5d5596fbb38e739a6cd7cfe280a01a020cb0..a1e96d5586450e28d34bf82c8c4466a9336fc9d4 100644 (file)
 
        $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); 
 
+       if (DB_TYPE == "pgsql") {
+               pg_query("set client_encoding = 'UTF-8'");
+               pg_set_client_encoding("UNICODE");
+       } else {
+               if (defined('MYSQL_CHARSET') && MYSQL_CHARSET) {
+                       db_query($link, "SET NAMES " . MYSQL_CHARSET);
+//                     db_query($link, "SET CHARACTER SET " . MYSQL_CHARSET);
+               }
+       }
+
        login_sequence($link, true);
 
        /* perform various redirect-needing subops */