ZF-7636: Decoding folder name

Issue Type: Improvement Created: 2009-08-19T07:09:58.000+0000 Last Updated: 2012-11-20T20:53:17.000+0000 Status: Closed Fix version(s): Reporter: Sébastien MALOT (wazzameleon) Assignee: None Tags: - Zend_Mail_Storage

Related issues: Attachments:


Folder name have to be decoded when they contents accents :

"Messages envoy&AOk-s" => "Messages envoyés"

In my application I have overloaded the class 'Zend_Mail_Storage_Folder' with this code :

<pre class="literal">
class Mail_Storage_Folder extends Zend_Mail_Storage_Folder {

    protected static $_decode = array('&-' => '&',
                                    '&AOk-' => 'é',
                                    '&AOI-' => 'â',
                                    '&AOA-' => 'à',
                                    '&AOg-' => 'è',
                                    '&AOc-' => 'ç',
                                    '&APk-' => 'ù',
                                    '&AOo-' => 'ê',
                                    '&AO4-' => 'î',
                                    '&APM-' => 'ó',
                                    '&APE-' => 'ñ',
                                    '&AOE-' => 'á',
                                    '&APQ-' => 'ô',
                                    '&AMk-' => 'É',
                                    '&AOs-' => 'ë');

     * get local name
     * @return string local name
    public function getLocalName()
        return self::decode($this->_localName);

     * get global name
     * @return string global name
    public function getGlobalName()
        return self::decode($this->_globalName);

    protected static function decode($value){
        return str_replace(array_keys(self::$_decode), array_values(self::$_decode), $value);

I don't what's the real encoding, so I couldn't made a generic method.

I hope I could help you, Bye


Posted by Rob Allen (rob) on 2012-11-20T20:53:17.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.