Welcome Guest, Not a member yet? Register   Sign In
iconv() Detected an illegal character in input string

Noticed that logs are filling up with a message from the same ip:

ERROR - 2011-01-19 12:13:23 --&gt; Severity: Notice --&gt; iconv() [<a href='function.iconv'>function.iconv</a>]: Detected an illegal character in input string /home/site/public_html/ci_sys/core/Unicode.php 89

The weird thing is that it is coming from the same ip. I can see that it is a user and not a bot because I see them passing CAPTCHA pages, doing updates etc. No malicious actions.
The error comes up on all pages that user goes through, regardless if they submit $_POST variables or not.

ANY help?

For every page request, $_GET, $_POST and $_COOKIE is cleaned. Somewhere in there is something that is not ASCII (and thus triggers the UTF8 functions), but not UTF-8 as well, which causes iconv to choke.

Weird thing though is that altough '//IGNORE' is used, it still generates the notice error...

[eluser]Ricardo SDL[/eluser]
I'm having problems with iconv too. One of the servers that I use to test the code is using the iconv lib version 1.13. Between my computer and the webserver there is a Squid proxy server. Squid was reporting some error about "Zero size length response". I nailed down the problem to a call to the iconv function in the class Utf8 line 89. The problem occours when I send non-ascii characters like "é", "á", etc.

According to some searches (link 1, link 2) that I made this could be a problem with the iconv library that php uses to convert the characters. With the webserver running on my localhost machine the call to the function is errorless, the iconv version is 2.12.1. Do I need to update the library? Or maybe using the function "mb_convert_encoding" is a good solution?

Theme © iAndrew 2016 - Forum software by © MyBB