aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Tools.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-xinc/poche/Tools.class.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 2ee86c74..263034f0 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -239,23 +239,16 @@ final class Tools
239 */ 239 */
240 public static function utf8ize($data) 240 public static function utf8ize($data)
241 { 241 {
242 if (is_array($data)) 242 if (is_array($data))
243 { 243 {
244 foreach ($data as $k => $v) 244 foreach ($data as $k => $v)
245 { 245 {
246 $data[$k] = self::utf8ize($v); 246 $data[$k] = self::utf8ize($v);
247 } 247 }
248 } 248 }
249 else if (is_string ($data)) 249 else if (is_string ($data) && '' == mb_detect_encoding($data))
250 { 250 {
251 if ('' == mb_detect_encoding($data)) 251 return utf8_encode($data);
252 {
253 return utf8_encode($data);
254 }
255 else
256 {
257 return $data;
258 }
259 } 252 }
260 return $data; 253 return $data;
261 } 254 }