News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How to fix? Wrong charset, conversion from...

Started by lllbob, February 17, 2011, 09:46:40 PM

Previous topic - Next topic

lllbob

   Hello all...   I have this annoying error log...  avatar error? How to make it stop?

Type of error: General
index.php?action=dlattach;attach=1;type=avatar
8: iconv() [<a href='function.iconv'>function.iconv</a>]: Wrong charset, conversion from `ISO-8859-1' to `UTF-8' is not allowed
File: htdocs/Sources/Display.php
Line: 1395

Using 2.0 RC3.

It seems to log the error upon every page load. The forum works fine though.
Any ideas on how to fix it? like change something in display.php. or maybe to just ignore the error and not log it would be fine with me. lol

Here is whats at line 1395..

Line 1394: // Convert the file to UTF-8, cuz most browsers dig that.
Line 1395: $utf8name = !$context['utf8'] && function_exists('iconv') ? iconv($context['character_set'], 'UTF-8', $real_filename) : (!$context['utf8'] && function_exists('mb_convert_encoding') ? mb_convert_encoding($real_filename, 'UTF-8', $context['character_set']) : $real_filename);
Line 1396: $fixchar = create_function('$n',


kat

Best advice?

RC3 was pretty buggy.

BACKUP and upgrade to RC5. :)

lllbob

Yeah. I will upgrade later on maybe. but I got edits that may not  upgrade though.

Anyway I fixed the log error myself. :-)

Line 1395: //edited whole thing out with //  LOL! and then simply Added $utf8name = ""; for the variable error.
and also edited Line 1413:
header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');
and changed that to:
header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

Now then.. no more log errors! yup yup. Errors = 0



Advertisement: