summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-27 12:14:56 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-27 12:14:56 -0700
commitf75ce45b6b6b848840d9a1688ca382a49de4f338 (patch)
tree8329c399364800df21cf5f1b0d02582f82e2a56d /modules/tag/helpers
parent5335e4c0b4bffeeeb8667ed706b5e8702de00ce9 (diff)
When detecting encodings, give priority to ISO-8859-1 which seems to
solve the umlaut problem in IPTC data. Fixes ticket #1144.
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_event.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index 1a593d3f..7fe9fba3 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -36,7 +36,8 @@ class tag_event_Core {
$tag = str_replace("\0", "", $tag);
foreach (explode(",", $tag) as $word) {
$word = trim($word);
- if (function_exists("mb_detect_encoding") && mb_detect_encoding($word) != "UTF-8") {
+ if (function_exists("mb_detect_encoding") &&
+ mb_detect_encoding($word, "ISO-8859-1, UTF-8") != "UTF-8") {
$word = utf8_encode($word);
}
$tags[$word] = 1;