Workaround for WINDOWS-1252 encoded data :(
authorRoland Häder <roland@mxchange.org>
Sun, 1 Nov 2009 18:40:48 +0000 (18:40 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 1 Nov 2009 18:40:48 +0000 (18:40 +0000)
inc/libs/yoomedia_functions.php

index 47015d5224dec9c41f13347b9fcdf01170fb3185..19f8a773f5bd22e92419d2a34e11c56bb56722ed 100644 (file)
@@ -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?