| Summary | Error in utf7-imap parsing when building folder tree |
| Queue | IMP |
| Queue Version | 4.0.1 |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | Horde Developers (at) , jan (at) horde (dot) org |
| Requester | jlaur-horde (at) vindvejr (dot) dk |
| Created | 01/14/2005 (7594 days ago) |
| Due | |
| Updated | 03/18/2006 (7166 days ago) |
| Assigned | 08/15/2005 (7381 days ago) |
| Resolved | 03/18/2006 (7166 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | |
| Patch | No |
All issues are now resolved, so you can close this case.
is correctly escaped in both.
possible for Horde to detect the absence of these extensions, to help
stupid administrators? iconv should be possible to detect, at least in
should I post this as a new report?
Kind regards,
Jacob Laursen
State ⇒ Not A Bug
folder of same name, because of the ':
javascript:open_compose_win('thismailbox=INBOX.Caf%26AOk--du-ve%27+Forever');
Seen in the browser as:
javascript:open_compose_win('thismailbox=INBOX.Caf%26AOk--du-ve'+Forever');
Looks like ' isn't escaped correctly for the JavaScript to work.
Anyway, back to the original problem. My PHP and imap/c-client:
archive md5sum
imap-2004g.tar.Z 9a80f58d8d6a0979c13714ae69050020
php-4.4.2.tar.bz2 28051cd9ef43490dd9727a4d442011b5
imap is built with "make slx" - no other options. PHP is configured like this:
./configure --with-mysql=/usr/local/mysql \
--with-apxs=/usr/local/apache/bin/apxs \
--with-zlib \
--enable-exif \
--with-gd \
--with-jpeg-dir=/usr/src/jpeg \
--with-gettext \
--with-imap=/usr/src/imap \
--with-imap-ssl \
--with-xml \
--with-dom
So I think it's a pretty basic/standard setup. Any suggestions what I
should try to change? I can try to have a look at imap_utf7_encode()
and see which system dependencies it has. But I still wonder why the
problem doesn't show for the folder list in IMP. Is imap_utf7_encode()
used in exactly the same way? I'll have another look, perhaps this
weekend.
A friend of mine is using PHP 4.4.1 and imap2004g also, without any
problems. I just can't spot the one important difference in our setups.
Kind regards,
Jacob Laursen
combo is broken since we use imap_utf7_encode() to do the encoding.
horde (3.0.9) and imp (h3-4.0.4).
The folder was created with Thunderbird (for Windows) and has (as
mentioned earlier) the following name in the filesystem:
.Caf&AOk--du-ve'
This displays correctly as "Café-du-ve'" in IMP's folder list, but is
truncated after the first three characters ("Caf") in Horde's menu and
in the box when choosing to rename the folder.
After renaming the folder in Horde to "Café-du-ve'" (the same name
that I wanted it to have), it's displays correctly, but in Thunderbird
it now appear as "Caf-du-ve'", i.e. the "é" character is stripped. In
the filesystem this becomes:
.Caf&6Q--du-ve'
Since I initially reported the problem, I've upgraded from RedHat 7.2
til Fedora Core 4 and from Courier IMAP 2.x to 4.x. So I've replaced
all system components.
Can this be a charset problem, perhaps fixable in Horde's
configuration? What wonders me the most is that some parts of Horde
can display the folder name correctly, while other parts can't.
/Jacob
State ⇒ Stalled
State ⇒ Feedback
try to track this further down.
State ⇒ Stalled
able to find out where, how, and why exactly this is happening, this
ticket is being stalled.
I've tried to switch to Western European (Windows) and Unicode
(UTF-8), but this doesn't change the appearance.
It happens both on the initial load and when I refresh the sidebar later on.
Which browser? Good point. I've just tried with Firefox 1.0 - no
problems! So it must be some IE compatibility issue?
State ⇒ Feedback
resp. refresh you it manually, or only if the sidebar is refreshed
automatically.
Also, what browser do you use and what charset are the pages displayed in?
Assigned to
State ⇒ Assigned
New Attachment: imp-bug.png
the correct version in this system - and forgot to mention it, sorry.
I've attached the screenshot for good manner.
State ⇒ Feedback
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Queue ⇒ IMP
Summary ⇒ Error in utf7-imap parsing when building folder tree
Type ⇒ Bug
correctly. The first problem is with a folder named: Caf&AOk--du-ve'
That is: Café-du-ve'
The problem is with the é - there seems to be a '\0' after the 'f',
which I guess is causing the problem in imp/lib/Block/tree_folders.php:
$tree->addNode($parent . $mailbox['value'],
$parent . $mailbox['parent'],
$mailbox['label'], $indent + $mailbox['level'], false, $node_params);
I've tried to do a String::convertCharset($mailbox['label'],
'UTF7-IMAP'). This helps a bit, because the folder tree is built
correctly, but the offending folders have no name.
After the failure, the rest of the tree is missing. See screenshot:
http://www.vindvejr.dk/~jlaur/temp/imp-bug.png
This means that I can't see the rest of the Horde menu items, i.e.
"Administration", "Options", "Log out" and any other Horde modules
alphabetically after "Mail".
I hope this description helps, otherwise feel free to ask for more
information. The same problem occurs with a folder named "Nytår"
("Nyt&AOU-r"), so I guess it's a general problem with non-ascii
characters.
--
Jacob Laursen