Re: imap_utf7_[en|de]code, from/to which charset?

From: Date: Sun, 12 Jan 2003 22:40:30 +0000
Subject: Re: imap_utf7_[en|de]code, from/to which charset?
References: 1 2  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-410@lists.php.net to get a copy of this message
Moriyoshi Koizumi wrote:
On Sun, Jan 12, 2003 at 06:37:48PM +0100, Jan Schneider wrote:
The PHP manual is a bit vague on what the imap_utf7 methods expect/return: "Converts 8bit data to modified UTF-7 text." 8bit data in what encoding? iso-8859-1 I guess.
imap_utf7_encode() function appears to regard any input strings as encoded in iso-8859-1 just like utf8_encode(). And vice versa. I'll be happy as a developer of php internals if you report such vagueness at the bug database too.
Done.
Does the modified utf-7 charset exist as such on common systems so that I can use mb_convert_encoding() or iconv() instead? If so, what's its name?
As php's iconv extension is a mere wrapper of the iconv library and imap utf-7 support is lacking in most iconv implementations, it's generally better to use mb_convert_encoding() than iconv(). Try the following: mb_convert_encoding("blahblah", "utf7-imap", "iso-8859-15");
That's not quite an answer to my question but thanks anyway. ;-) Just to clarify: utf7-imap is an official or at least supported charset name? Jan.

« previous php.i18n (#410) next »