]> git.wh0rd.org Git - tt-rss.git/commitdiff
mysql: set connection charset to utf-8
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 17 Aug 2007 16:02:15 +0000 (17:02 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 17 Aug 2007 16:02:15 +0000 (17:02 +0100)
backend.php
opml.php
update.php
update_daemon.php
update_feeds.php
xml-rpc.php

index 24f3bba3bd9b8b07e5a1218adf5cf2d1fc07592d..c5757a2ff13b5960d99007d17e44aa7448dbd857 100644 (file)
@@ -49,6 +49,9 @@
        if (DB_TYPE == "pgsql") {
                pg_query("set client_encoding = 'UTF-8'");
                pg_set_client_encoding("UNICODE");
+       } else {
+               db_query($link, "SET NAMES utf8");
+               db_query($link, "SET CHARACTER SET utf8");
        }
 
        $op = $_REQUEST["op"];
index b1a62ab8c739365452112ddbffea9bf51d967a71..ac236a64b60d8d060ea4f7b3895a6425d517452c 100644 (file)
--- a/opml.php
+++ b/opml.php
@@ -13,6 +13,9 @@
        if (DB_TYPE == "pgsql") {
                pg_query($link, "set client_encoding = 'utf-8'");
                pg_set_client_encoding("UNICODE");
+       } else {
+               db_query($link, "SET NAMES utf8");
+               db_query($link, "SET CHARACTER SET utf8");
        }
 
        login_sequence($link);
index 8daacc969a85be14c517b1e8dcb93ecfc00f08bd..e15e3be00b1f2558694d8c1c75a322f79562a839 100644 (file)
        if (DB_TYPE == "pgsql") {
                pg_query($link, "set client_encoding = 'utf-8'");
                pg_set_client_encoding("UNICODE");
+       } else {
+               db_query($link, "SET NAMES utf8");
+               db_query($link, "SET CHARACTER SET utf8");
        }
-       
+
        login_sequence($link);
        
        $owner_uid = $_SESSION["uid"];
index b7a5116883538eaa8481f2fc052b92f7f8e09010..25ef6a993acbd1ed50f3897d0cf86a36cbe4501f 100644 (file)
@@ -65,6 +65,9 @@
        if (DB_TYPE == "pgsql") {
                pg_query("set client_encoding = 'utf-8'");
                pg_set_client_encoding("UNICODE");
+       } else {
+               db_query($link, "SET NAMES utf8");
+               db_query($link, "SET CHARACTER SET utf8");
        }
 
        $last_purge = 0;
index 32635b824874e6f9f8d3cb4331d6b6abd05ad7d5..aa07321e66fdd9d0d140cb524c260ba9408ae152 100644 (file)
@@ -26,6 +26,9 @@
        if (DB_TYPE == "pgsql") {
                pg_query("set client_encoding = 'utf-8'");
                pg_set_client_encoding("UNICODE");
+       } else {
+               db_query($link, "SET NAMES utf8");
+               db_query($link, "SET CHARACTER SET utf8");
        }
 
        $result = db_query($link, "SELECT id FROM ttrss_users");
index 8c65123f82fd88fac696b0426559b227e2b12d00..d61382c0890aa701416ce623aba2441c5e02f180 100644 (file)
@@ -22,6 +22,9 @@
        if (DB_TYPE == "pgsql") {
                pg_query("set client_encoding = 'utf-8'");
                pg_set_client_encoding("UNICODE");
+       } else {
+               db_query($link, "SET NAMES utf8");
+               db_query($link, "SET CHARACTER SET utf8");
        }
 
        function getVirtualFeeds($msg) {