summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-03-24 14:33:37 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2016-03-24 14:33:37 +0100
commitf1f769a37e37fdcf0549d135e967fe840b10976e (patch)
tree506582646d99f0ab9a2ee5c1de40bd8f639e6a25 /db
parentd3785b5042d5cb8699e1b1748317d7032ad3575d (diff)
explicitely use utf-8 encoding
Diffstat (limited to 'db')
-rw-r--r--db/item.php3
-rw-r--r--db/itemmapper.php2
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);
}