diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-09-04 20:03:33 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-09-04 20:03:33 +0000 |
commit | 528c75ab35b915b574b4977b8d19412b69845d26 (patch) | |
tree | 6383643f7c8e1e83406560f13988eed628ade253 /include/functions_metadata.inc.php | |
parent | 0257b32062e0a93c92349f9d549154b2dd8a8ffa (diff) |
bug 2735: fix/improve non latin language tags
a. non latin tags (greek/cyrillic...) are not sorted case-insesitive and group by letter view in tag list is not case insesitive
b. quick searching tag names does not perform correctly accent folding (e.g. Köln and Koln do not match) and case insesitivity for non latin letters
c. missing from remove_accents characters in romanian language (Latin Extended-B)
? c8 98 = LATIN CAPITAL LETTER S WITH COMMA BELOW
? c8 99 = LATIN SMALL LETTER S WITH COMMA BELOW
? c8 9a = LATIN CAPITAL LETTER T WITH COMMA BELOW
? c8 9b = LATIN SMALL LETTER T WITH COMMA BELOW
d. str2url allow non latin letters in output only if the input does not contain any valid lating letter/digit. we should always allow non latin letters in output
git-svn-id: http://piwigo.org/svn/trunk@17748 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_metadata.inc.php')
-rw-r--r-- | include/functions_metadata.inc.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/functions_metadata.inc.php b/include/functions_metadata.inc.php index e8935aefd..5a8671d77 100644 --- a/include/functions_metadata.inc.php +++ b/include/functions_metadata.inc.php @@ -90,10 +90,12 @@ function clean_iptc_value($value) // apparently mac uses some MacRoman crap encoding. I don't know // how to detect it so a plugin should do the trick. $value = trigger_event('clean_iptc_value', $value); - $is_utf8 = seems_utf8($value); - $value = convert_charset( $value, - $is_utf8 ? 'utf-8' : 'iso-8859-1', - get_pwg_charset() ); + if ( ($qual = qualify_utf8($value)) != 0) + {// has non ascii chars + $value = convert_charset( $value, + $qual>0 ? 'utf-8' : 'iso-8859-1', + get_pwg_charset() ); + } } return $value; } |