From: Andrew Dolgov Date: Sun, 26 Aug 2007 10:51:17 +0000 (+0100) Subject: mobile: fix mysql charset X-Git-Tag: 1.2.15~26 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=da3427a03b2e15a545acc1dbd9a9c176bc7d8ad8;p=tt-rss.git mobile: fix mysql charset --- diff --git a/mobile/tt-rss.php b/mobile/tt-rss.php index 637e5d55..a1e96d55 100644 --- a/mobile/tt-rss.php +++ b/mobile/tt-rss.php @@ -13,6 +13,16 @@ $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 */