From e5e1eb0195d2501920fb46651a144747750fc913 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 13 Apr 2011 05:51:22 -0400
Subject: [PATCH] Convert normalized latin-1 string back to utf8

---
 program/include/rcube_addressbook.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php
index 8ec0abb..10477e8 100644
--- a/program/include/rcube_addressbook.php
+++ b/program/include/rcube_addressbook.php
@@ -405,10 +405,10 @@
         
         foreach ($arr as $i => $part) {
             if (utf8_encode(utf8_decode($part)) == $part) {  // is latin-1 ?
-                $arr[$i] = strtr(strtolower(strtr(utf8_decode($part),
+                $arr[$i] = utf8_encode(strtr(strtolower(strtr(utf8_decode($part),
                     '��������������������������������������������������',
                     'ccaaaaeeeeiiiaeooouuuyooaiounnaaaaaeeeiiioooouuuyy')),
-                    array('�' => 'ss', 'ae' => 'a', 'oe' => 'o', 'ue' => 'u'));
+                    array('�' => 'ss', 'ae' => 'a', 'oe' => 'o', 'ue' => 'u')));
             }
             else
                 $arr[$i] = strtolower($part);

--
Gitblit v1.9.1