FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Mini-patch to better deal with mailing-list subject lines
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Mini-patch to better deal with mailing-list subject lines [message #163913] Sat, 11 December 2010 09:35 Go to previous message
mguillaume is currently offline  mguillaume   France
Messages: 13
Registered: December 2010
Karma:
Junior Member
This helps with mail imports with encoded subject lines when iconv.internal_encoding is not UTF-8.

I tested this locally : I was getting an error on database insert before, the mail imports fine with the patch (phpinfo shows iconv.internal_encoding being iso8859-1 on the server).

--- scripts_common.old  2010-12-11 13:59:23.000000000 +0100
+++ scripts_common.inc  2010-12-11 13:59:07.000000000 +0100
@@ -140,7 +140,7 @@

        // Better to let PHP do it as it will also deal with non-UTF-8 characters.
        if (function_exists('iconv_mime_decode')) {
-               return iconv_mime_decode(trim($val), 2);
+               return iconv_mime_decode(trim($val), 2, "UTF-8");
        }

        // Decode string.
[Message index]
 
Read Message
Read Message
Previous Topic: Useful function when there are still some ISO-8859 chars in the UTF8 database stored messages
Next Topic: Suggestion for the "rebuild search index" page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 16:12:57 GMT 2024

Total time taken to generate the page: 0.04707 seconds