Opened 2 years ago

Closed 2 years ago

#1487138 closed Bugs (wontfix)

Could not convert string from UTF7-IMAP to UTF-8.

Reported by: pacinpm Owned by:
Priority: 5 Milestone: 0.5-beta
Component: PHP backend Version: 0.4.2
Severity: normal Keywords:
Cc: pacinpm@…

Description

I am using Roundcube on Debian. Inteface is set to Polish. I have some mail folders with local characters ("Wysłane" - Sent). When I try to manage folders I get this error:

PHP Error in /var/www/clockwork-bits.pl/mail/program/include/main.inc (308): Could not convert string from UTF7-IMAP to UTF-8. Make sure iconv/mbstring is installed or lib/utf8.class is available.

( ! ) Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 35 bytes) in /var/www/clockwork-bits.pl/mail/program/include/main.inc on line 249
Call Stack
# Time Memory Function Location
1 0,0022 129220 {main}( ) ../index.php:0
2 0,3088 4798724 include( '/var/www/clockwork-bits.pl/mail/program/steps/settings/manage_folders.inc' ) ../index.php:255
3 0,4292 6620264 rcube_template->send( ) ../manage_folders.inc:429
4 0,4292 6620264 rcube_template->parse( ) ../rcube_template.php:308
5 0,4295 6621756 rcube_template->parse_xml( ) ../rcube_template.php:399
6 0,4296 6621756 preg_replace_callback ( ) ../rcube_template.php:607
7 0,4552 6818000 rcube_template->xml_command( ) ../rcube_template.php:0
8 0,4560 6818644 call_user_func ( ) ../rcube_template.php:687
9 0,4560 6818644 rcube_subscription_form( ) ../rcube_template.php:0
10 0,4583 6821064 rcube_imap->list_unsubscribed( ) ../manage_folders.inc:220
11 35,6496 31866332 rcube_imap->_sort_mailbox_list( ) ../rcube_imap.php:2687
12 62,1958 66682976 rcube_charset_convert( ) ../rcube_imap.php:3631

Change History (8)

comment:1 Changed 2 years ago by pacinpm

  • Cc pacinpm@… added

comment:2 follow-up: Changed 2 years ago by alec

  • Component changed from User Interface to PHP backend
  • Milestone changed from later to 0.5-beta

What IMAP server/version? What PHP version? Do you have mbstring/iconv modules installed? Enable imap_debug and attach the log here.

comment:3 in reply to: ↑ 2 Changed 2 years ago by pacinpm

Replying to alec:

What IMAP server/version? What PHP version? Do you have mbstring/iconv modules installed? Enable imap_debug and attach the log here.

===========================
uw-imapd: 7:2007b~dfsg-4+lenny3
===========================
PHP Version: 5.2.6-1+lenny9
===========================
mbstring
Multibyte Support enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On
===========================
iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.7

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

comment:4 follow-up: Changed 2 years ago by alec

Additionaly to imap_debug, you could also find a line

'message' => "Could not convert string from $from to $to. Make sure iconv/mbstring is installed or lib/utf8.class is available."

in main.inc file and change it to

'message' => "Could not convert string [$str] from $from to $to. Make sure iconv/mbstring is installed or lib/utf8.class is available."

To print problematic string with the error message.

comment:5 in reply to: ↑ 4 Changed 2 years ago by pacinpm

Replying to alec:

To print problematic string with the error message.

Problematic string contains path to file on my webserver, outside of subfolder where Roundcube resides. I have trouble with imap_debug. It generates 12MB file with paths to all files on my webserver and also includes login names and passwords.

PHP Error in /var/www/clockwork-bits.pl/mail/program/include/main.inc (308): Could not convert string 
[cbs_html/delphi/Rysunki/materia�y pomocnicze do marketingu.cdr] 
from UTF7-IMAP to UTF-8. Make sure iconv/mbstring is installed or lib/utf8.class is available.

comment:6 Changed 2 years ago by alec

  • Resolution set to wontfix
  • Status changed from new to closed

If these folder names are not encoded with utf7-imap, then it's uw-imap issue.

comment:7 Changed 2 years ago by pacinpm

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Problem is there are no such folders in my mail account. It looks like Roundcube takes them directly from filesystem. Mail account has only standard folders created by Mozilla Thunderbird. I can't see how IMAP server can be blamed here.

comment:8 Changed 2 years ago by alec

  • Resolution set to wontfix
  • Status changed from reopened to closed

Check the imap_debug and you'll see. Roundcube doesn't read filesystem.

Note: See TracTickets for help on using tickets.