From eac90243793cf8ba3da2117ac2d76efbcec24e53 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 15 Feb 2016 21:04:47 +0000
Subject: [PATCH] Usprawnienia wczytywania UTF-8 w module kino
---
class/std.php | 1 +
modules/70_kino/handler.php | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/class/std.php b/class/std.php
index 884d2df..400340b 100644
--- a/class/std.php
+++ b/class/std.php
@@ -39,3 +39,4 @@
libxml_use_internal_errors();
libxml_disable_entity_loader(true);
spl_autoload_register('botAutoload');
+ini_set('default_charset', 'utf-8');
diff --git a/modules/70_kino/handler.php b/modules/70_kino/handler.php
index af9e6eb..4636d92 100644
--- a/modules/70_kino/handler.php
+++ b/modules/70_kino/handler.php
@@ -7,7 +7,7 @@
libxml_use_internal_errors(TRUE);
$dom = new DOMDocument();
- if(!$dom->loadHTML($dane)) {
+ if(!$dom->loadHTML('<?xml encoding="utf-8" ?>' . $dane)) {
libxml_use_internal_errors(FALSE);
$down->cacheFor(1800);
return FALSE;
@@ -287,4 +287,3 @@
return new BotMsg($txt);
}
}
-?>
\ No newline at end of file
--
Gitblit v1.9.1