0

I have multilanguage emails(Hindi,chinese,japanese etc).
I can not read that multilanguage emails using
imap_fetchbody or imap_body or imap_bodystruct

can anyone help me to read emails?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by vizz
0

There are many possibilities, for example using UTF-8:
1 . you must check charset or character encoding on your PHP settings (php.ini default) and code;
2. php output header, like:

header('Content-Type: text/html; charset=UTF-8');

3. display page (client-side) HTML code have set the mime type coresponding to the language in use, like:

<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

4. use php function imap_utf8() to encode the mail content into UTF-8 charset;
5. to campare and converting string values, use multibyte string functions: http://php.net/mbstring, note: php is not offering guarantees on multibyte comparison and conversions, because currently the php Zend engine is not supporting unicode.

Edited by eXpertPHP: n/a

0

There are many possibilities, for example using UTF-8:
1 . you must check charset or character encoding on your PHP settings (php.ini default) and code;
2. php output header, like:

header('Content-Type: text/html; charset=UTF-8');

3. display page (client-side) HTML code have set the mime type coresponding to the language in use, like:

<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

4. use php function imap_utf8() to encode the mail content into UTF-8 charset;
5. to campare and converting string values, use multibyte string functions: http://php.net/mbstring, note: php is not offering guarantees on multibyte comparison and conversions, because currently the php Zend engine is not supporting unicode.

I tried lot but it's not working

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.