From f1f769a37e37fdcf0549d135e967fe840b10976e Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 24 Mar 2016 14:33:37 +0100 Subject: explicitely use utf-8 encoding --- db/item.php | 3 ++- db/itemmapper.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/db/item.php b/db/item.php index a5daacc65..153414c93 100644 --- a/db/item.php +++ b/db/item.php @@ -220,7 +220,8 @@ class Item extends Entity implements IAPI, \JsonSerializable { html_entity_decode(strip_tags($this->getBody())) . html_entity_decode($this->getAuthor()) . html_entity_decode($this->getTitle()) . - $this->getUrl() + $this->getUrl(), + 'UTF-8' ) ); $this->setFingerprint($this->computeFingerprint()); diff --git a/db/itemmapper.php b/db/itemmapper.php index b7a594122..895b0f7ae 100644 --- a/db/itemmapper.php +++ b/db/itemmapper.php @@ -68,7 +68,7 @@ class ItemMapper extends NewsMapper { private function buildLikeParameters($search=[]) { return array_map(function ($param) { $param = addcslashes($param, '\\_%'); - return '%' . mb_strtolower($param) . '%'; + return '%' . mb_strtolower($param, 'UTF-8') . '%'; }, $search); } -- cgit v1.2.3