openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 6871d75fc030628e87083126049e07614e967bf6
parent 357f5940c355c4163931bc7a429b1dd9cd2f6b18
Author: Jan Dankert <devnull@localhost>
Date:   Thu, 10 Jul 2014 23:54:14 +0200

Fix: Konvertierung von ISO8859-1 zu UTF-8 funktionierte nicht immer.

Diffstat:
db/db.class.php | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/db/db.class.php b/db/db.class.php @@ -441,7 +441,7 @@ class DB } - private function convertCharsetToDatabase($text) + private function convertCharsetToDatabase(&$text) { //Logger::debug('from '.$text); $dbCharset = @$this->conf['charset']; @@ -460,20 +460,17 @@ class DB } - private function convertCharsetFromDatabase($text) + private function convertCharsetFromDatabase(&$text) { - //Logger::debug('from '.$text); $dbCharset = @$this->conf['charset']; if ( !empty($dbCharset) && $dbCharset != 'UTF-8' ) { - //Logger::debug('Converting to UTF-8 from '.$dbCharset); if ( !function_exists('iconv') ) Logger::warn('iconv not available - database charset unchanged. Please '. 'enable iconv on your system or transform your database content to UTF-8.'); else $text = iconv($dbCharset,'UTF-8//TRANSLIT',$text); } - //Logger::debug('to '.$text); return $text; }