From 55980dc6bc65fb3c766ff053440a7446962cb85f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 1 Nov 2009 18:40:48 +0000 Subject: [PATCH] Workaround for WINDOWS-1252 encoded data :( --- inc/libs/yoomedia_functions.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 47015d5224..19f8a773f5 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -116,7 +116,15 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) { // Convert from ISO to UTF-8 foreach ($response as $k => $v) { - $response[$k] = iconv('ISO-8859-1', 'UTF-8//TRANSLIT',$v); + $response[$k] = iconv('windows-1252', 'UTF-8//TRANSLIT', $v); + /* + // iconv()-less ISO-8859-1 -> UTF-8 + $response[$k] = preg_replace( + "/([\x80-\xFF])/e", + "chr(0xC0|ord('\\1')>>6).chr(0x80|ord('\\1')&0x3F)", + $v + ); + */ } // END - if // Shall we count the query as used? -- 2.39.5