Roundcube Community Forum
Release Support => Pending Issues => Topic started by: toddr123 on August 20, 2007, 12:50:11 PM
-
Warning: mb_convert_encoding() [function.mb-convert-encoding]: Illegal character encoding specified in /home/roundcube/domains/webmailrc.mydomain.com/public_html/new/program/include/main.inc on line 924
Warning: mb_convert_encoding() [function.mb-convert-encoding]: Illegal character encoding specified in /home/roundcube/domains/webmailrc.mydomain.com/public_html/new/program/include/main.inc on line 924
Getting this when I login to my personal account, wasn't happening the other day, shortly after install. Seems it's not happening on all accounts and all in all it seems random.
Any ideas? Is it a bug? Something I did wrong during install?
-
Anyone?
-
Well, I did just add an @ to mb_convert_encoding so the lines read
// return if convert succeeded
if (($out = @mb_convert_encoding($str, $to, $from)) != '')
return $out;
}
So at least the warning doesn't show anymore. And as it seems everything still works here for me :)
-
Cool, I will try this.
Most importantly, I now know I am not the only one having this problem. :D
Thanks!
-
Argg.. :(
I tested it just before making the change to be sure I knew it was broke before and fixed after and now it's back to working again, even before the change.
So, the problem is off and on.
I think it must have something to do with the messages in the mailbox, otherwise it probably wouldn't be off and on.
When the error shows up again, I will try the change. I have it in place now but commented out.
-
Hey guys I'm also getting this error, I'm not sure how to fix it. Any ideas? I'm a full blown noob here.
-
The bigger question is, why do we seem to be the only ones getting this error? What's different about our setup? Did you guys all do a fresh install or an upgrade?
-
The bigger question is, why do we seem to be the only ones getting this error? What's different about our setup? Did you guys all do a fresh install or an upgrade?
I did a fresh install today and that's the error I keep getting. I'm totally new to this as I said, so I'm even more in the dark than you guys would be.
-
I get the same issue, I've posted in the possibly wrong forum (release candidate forum) about it and another issue.
Many (/most) people wont get this because the offending line of code is only executed if you've installed the MBString extension (which provides medicore Unicode support to PHP). It's not installed by default, and tragically few PHP developers internationalize their applications so it's only installed on a small subset of PHP installs.
-
Okay,
I've worked on this issue a bit myself, debugging the code in main.inc.php, I looked at all the conversions being attempted, and got this list (trimmed):
UTF-8 -> UTF7-IMAP
UTF-8 -> UTF7-IMAP
UTF-8 -> UTF7-IMAP
UTF-8 -> UTF7-IMAP
UTF-8 -> ISO-8859-1
UTF-8 -> ISO-8859-1
UTF-8 -> ANSI
UTF-8 -> ISO-8859-1
UTF-8 -> US-ASCII
UTF-8 -> ISO-8859-1
UTF-8 -> US-ASCII
UTF-8 -> ISO-8859-1
UTF-8 -> ISO-8859-1
UTF-8 -> ISO-8859-1
The warning was only being raised once, so I guessed that mb_convert_encoding() doesn't know what ANSI means, I put in an alternate case structure to handle that case and I don't get the error anymore. This is a.. bad solution, presently I'm returning an empty string for an ANSI string with is sub-optimal. I'll ask someone sooner or later what the best way to convert those is.
-
s/->/<-
-
last reply, I promise.
ANSI isn't a recognized character set for the mb_string library, it's not on the list http://php.net/manual/en/ref.mbstring.php#mbstring.supported-encodings. However, according to http://www.alanwood.net/demos/ansi.html ANSI is the same as WINDOWS-1252, which is on that magic list. I've added a simple case structure to check for ANSI, and replace it with Windows-1252 which seems to have worked, and likely without losing any data. Any dev can probably use this information to stick a case structure into the next release in a more apropriate location.
-
There also appears to be a problem with ISO-5589-1 to UTF-8 conversions.
ISO-5589-1 UTF-8
Warning: mb_convert_encoding() [function.mb-convert-encoding]: Illegal character encoding specified in /var/www/webmail/program/include/main.inc on line 248
Thanks
-Richard