Package: ilohamail
Version: 0.8.14-0rc3
Severity: normal
Tags: patch

Hi,

IlohaMail does not convert correctly (from charsets different from 
iso8859-1 and utf-8) to utf-8. This is because it uses the utf8_encode 
function that is designed to convert from iso8859-1 to utf-8. Using the 
iconv function, it is easy to perform the needed conversion, for all 
source charsets. I tried it successfully (as far as I can recognize the 
corresponding characters) with both ISO-2022-JP and windows-1251 
charsets. See the attached patch.


Cheers,

Nicolas Boullis

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-rc1-tintin
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages ilohamail depends on:
ii  apache-ssl [httpd]            1.3.33-3   versatile, high-performance HTTP s
ii  debconf                       1.4.30.11  Debian configuration management sy
ii  exim [mail-transport-agent]   3.36-13    An MTA (Mail Transport Agent)
ii  php4                          4:4.3.10-2 server-side, HTML-embedded scripti

-- debconf information:
* ilohamail/restart: false
* ilohamail/webserver_type: apache-ssl
* ilohamail/weblocation: /IlohaMail
diff -u ilohamail-0.8.14/debian/changelog ilohamail-0.8.14/debian/changelog
--- ilohamail-0.8.14/debian/changelog
+++ ilohamail-0.8.14/debian/changelog
@@ -1,3 +1,9 @@
+ilohamail (0.8.14-0rc3.nboullis.1) unstable; urgency=low
+
+  * Fix charset conversion to UTF-8.
+
+ -- Nicolas Boullis <[EMAIL PROTECTED]>  Mon, 21 Feb 2005 19:29:37 +0100
+
 ilohamail (0.8.14-0rc3) unstable; urgency=low
 
   * Bug fix: "ilohamail: PHP applications should never depend on
diff -u ilohamail-0.8.14/debian/patches/00list 
ilohamail-0.8.14/debian/patches/00list
--- ilohamail-0.8.14/debian/patches/00list
+++ ilohamail-0.8.14/debian/patches/00list
@@ -3,0 +4 @@
+04-utf8-conversion
only in patch2:
unchanged:
--- ilohamail-0.8.14.orig/debian/patches/04-utf8-conversion.dpatch
+++ ilohamail-0.8.14/debian/patches/04-utf8-conversion.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04-utf8-conversion.dpatch by Nicolas Boullis <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix charset conversions to UTF-8.
+
[EMAIL PROTECTED]@
+diff -urNad ilohamail-0.8.14/IlohaMail/lang/UTF-8.inc 
/tmp/dpep.l49EwA/ilohamail-0.8.14/IlohaMail/lang/UTF-8.inc
+--- ilohamail-0.8.14/IlohaMail/lang/UTF-8.inc  2003-06-29 22:26:33.000000000 
+0200
++++ /tmp/dpep.l49EwA/ilohamail-0.8.14/IlohaMail/lang/UTF-8.inc 2005-02-21 
19:41:28.000000000 +0100
+@@ -24,8 +24,7 @@
+ }
+ 
+ function LangConvert($string, $charset, $charset2){
+-      if($charset!=$charset2) return utf8_encode($string);
+-      else return $string;
++      return iconv($charset2, $charset, $string);
+ }
+ 
+ function LangEncodeSubject($input, $charset){

Reply via email to