#32586 [Opn->Bgs]: imap_utf7_encode doesn't work as expected
| From: | sniper@php.net | Date: | Wed, 06 Apr 2005 16:26:21 +0000 |
| Subject: | #32586 [Opn->Bgs]: imap_utf7_encode doesn't work as expected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76917@lists.php.net to get a copy of this message | ||
ID: 32586
Updated by: sniper@php.net
Reported By: mschering at intermesh dot nl
-Status: Open
+Status: Bogus
Bug Type: IMAP related
Operating System: Linux 2.6
PHP Version: 4.3.10
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2005-04-05 12:54:15] mschering at intermesh dot nl
Description:
------------
These functions do not work:
/**
* Replacement for $this->utf7_encode because it expects the text to
be in
* ISO-8859-1 format while GO uses UTF-8.
*
* @access public
* @param $text The UTF-8 encoded text to encode in UTF-7
* @return string UTF-7 encoded text
*/
function utf7_encode($text)
{
return imap_utf7_encode(utf8_decode($text));
}
/**
* Replacement for $this->utf7_decode becuase it returns the text in
* ISO-8859-1 format while GO uses UTF-8.
*
* @access public
* @param $text The UTF-7 text to encode to UTF-8
* @return string UTF-8 encoded text
*/
function utf7_decode($text)
{
return utf8_encode(imap_utf7_decode($text));
}
}
Reproduce code:
---------------
Use these functions and encode UTF-8 strings with characters like ëäö
etc in it and it will produce garbage.
I use these in my mail client and it works but other mail clients do
not see the folders correctly.
Expected result:
----------------
Other mail clients should see the folder names correctly
Actual result:
--------------
The folder names have strange characters in other mail clients
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32586&edit=1