diff --git a/backend.php b/backend.php index 24f3bba3b..c5757a2ff 100644 --- a/backend.php +++ b/backend.php @@ -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"]; diff --git a/opml.php b/opml.php index b1a62ab8c..ac236a64b 100644 --- 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); diff --git a/update.php b/update.php index 8daacc969..e15e3be00 100644 --- a/update.php +++ b/update.php @@ -13,8 +13,11 @@ 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"]; diff --git a/update_daemon.php b/update_daemon.php index b7a511688..25ef6a993 100644 --- a/update_daemon.php +++ b/update_daemon.php @@ -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; diff --git a/update_feeds.php b/update_feeds.php index 32635b824..aa07321e6 100644 --- a/update_feeds.php +++ b/update_feeds.php @@ -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"); diff --git a/xml-rpc.php b/xml-rpc.php index 8c65123f8..d61382c08 100644 --- a/xml-rpc.php +++ b/xml-rpc.php @@ -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) {