summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfox <[email protected]>2018-08-07 11:10:50 +0000
committerGogs <[email protected]>2018-08-07 11:10:50 +0000
commit03fff1e95e839a8cd36dc6d7032be0d16eff35f7 (patch)
tree983f4b250b5dd94cbddf90f850f1fd33d56240c0
parentc925f4e3fdad04442c5c2f542883dbd26c81cc23 (diff)
parent2b8afd49426f4c1b9842c50ea1794d44a8577747 (diff)
Merge branch 'fix_mysql_utf8mb4' of BtbN/tt-rss into master
-rwxr-xr-xclasses/rssutils.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php
index 3315d9f88..b69bb25a0 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -767,7 +767,7 @@ class RSSUtils {
_debug("plugin data: $entry_plugin_data", $debug_enabled);
// Workaround: 4-byte unicode requires utf8mb4 in MySQL. See https://tt-rss.org/forum/viewtopic.php?f=1&t=3377&p=20077#p20077
- if (DB_TYPE == "mysql") {
+ if (DB_TYPE == "mysql" && MYSQL_CHARSET != "UTF8MB4") {
foreach ($article as $k => $v) {
// i guess we'll have to take the risk of 4byte unicode labels & tags here
if (is_string($article[$k])) {
@@ -1053,7 +1053,7 @@ class RSSUtils {
$e->type, $e->length, $e->title, $e->width, $e->height);
// Yet another episode of "mysql utf8_general_ci is gimped"
- if (DB_TYPE == "mysql") {
+ if (DB_TYPE == "mysql" && MYSQL_CHARSET != "UTF8MB4") {
for ($i = 0; $i < count($e_item); $i++) {
if (is_string($e_item[$i])) {
$e_item[$i] = RSSUtils::strip_utf8mb4($e_item[$i]);