Postie and undefined iconv
-
My environment variable on a shared server with my hosting company is as follows:
PATH = /usr/local/bin:/usr/bin:/bin
DOCUMENT_ROOT = /home/myhostname/public_html
HTTP_ACCEPT = */*
HTTP_ACCEPT_ENCODING = gzip, deflate
HTTP_ACCEPT_LANGUAGE = en-gb
HTTP_CONNECTION = Keep-Alive
HTTP_COOKIE = PHPSESSID=4106c9a9c637449bfb9261707e234ef8
HTTP_HOST = https://www.myhostname.org.uk
HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; image_azv; InfoPath.1)
SCRIPT_FILENAME = /home/myhostname/public_html/test.php
SERVER_ADMIN = [email protected]
SERVER_NAME = https://www.myhostname.org.uk
SERVER_PORT = 80
SERVER_SOFTWARE = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = HTTP/1.1
REQUEST_METHOD = GET
QUERY_STRING =Using latest WP 2.0.5 and postie version.
The following error is resultant when an email containing Chinese Text (encoded in “iso-2022-jp” by Outlook 2003 is received).
How can this be fixed, in light of limited permission to change PHP.ini on a shared server.
Fatal error: Call to undefined function: iconv() in /home/myhostname/public_html/newWeb/wp-content/plugins/postie/postie-functions.php on line
I think the following is the culprit function:
function ConvertToUTF_8($encoding,$charset,&$body) {
$charset = strtolower($charset);
$encoding = strtolower($encoding);
switch($charset) {
case “iso-8859-1”:
$body = utf8_encode($body);
break;
case “iso-2022-jp”:
$body = iconv(“ISO-2022-JP//TRANSLIT”,”UTF-8″,$body);
break;
}
}
- The topic ‘Postie and undefined iconv’ is closed to new replies.