diff options
author | momo-i <webmaster@momo-i.org> | 2011-02-01 07:32:44 +0900 |
---|---|---|
committer | momo-i <webmaster@momo-i.org> | 2011-02-01 07:32:44 +0900 |
commit | c791ae96d5bb28f39b26a0e556e10e636f97436c (patch) | |
tree | a8a0055fdc8bcd6d02ef41b8268074670b5b65a6 /modules | |
parent | d2c77fd0590501f7b6b51d9f4cc033ed9485b082 (diff) |
fixed tag broken
Diffstat (limited to 'modules')
-rw-r--r-- | modules/exif/helpers/exif.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 1cdf7d34..f752d336 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -37,6 +37,11 @@ class exif_Core { if (isset($exif_raw[$exifvar[0]][$exifvar[1]])) { $value = $exif_raw[$exifvar[0]][$exifvar[1]]; if (function_exists("mb_detect_encoding") && + function_exists("mb_convert_encoding") && + mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { + $value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value)); + } + else if (function_exists("mb_detect_encoding") && mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { $value = utf8_encode($value); } @@ -61,6 +66,11 @@ class exif_Core { if (!empty($iptc[$iptc_key])) { $value = implode(" ", $iptc[$iptc_key]); if (function_exists("mb_detect_encoding") && + function_exists("mb_convert_encoding") && + mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { + $value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value)); + } + else if (function_exists("mb_detect_encoding") && mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { $value = utf8_encode($value); } |