Welcome Guest, Not a member yet? Register   Sign In
Japanese (multi-byte) characters & email library
#2

[eluser]座頭市[/eluser]
This has been a headache of mine for a long time....

The standard for Japanese emails is iso-2022-jp, not utf-8 - it would be best to change your email encoding and run the subject and body text through iconv(). This will solve most, but not all, mojibake problems.

For example:
Code:
$this->load->library('email');

$config['charset'] = 'iso-2022-jp';

$this->email->initialize($config);

$this->email->to('[email protected]');
$this->email->from('[email protected]');
$this->email->subject(iconv('utf-8', 'iso-2022-jp', $subject));
$this->email->message(iconv('utf-8', 'iso-2022-jp', $message));
iso-2022-jp is a 7-bit encoding as opposed to 8-bit, so often plays nicer with email clients across the board. Even Hotmail, notorious for destroying utf-8 encoded emails.


Messages In This Thread
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 03:15 AM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 04:36 AM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 05:11 PM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 07:34 PM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 08:10 PM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 10:58 PM
Japanese (multi-byte) characters & email library - by El Forum - 03-14-2008, 01:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB