Recent Topics

1 Mar 05, 2011 16:19    

My b2evolution Version: Not Entered

Notice: iconv() [function.iconv]: Detected an illegal character in input string in /home/tilqi/public_html/inc/locales/_charset.funcs.php on line 95

Warning: Cannot modify header information - headers already sent by (output started at /home/tilqi/public_html/inc/locales/_charset.funcs.php:95) in /home/tilqi/public_html/inc/_core/_template.funcs.php on line 213

Additional information on this error:
Headers have already been sent. Cannot redirect.

i started getting these errors after moving to a new server, but my old server's php and iconv versions match the new one.

2 Mar 06, 2011 01:11

 * @todo Tblue> Try more locales.


I think you just did

3 Mar 07, 2011 00:43

so is this a bug ?

i wonder why it didnt use to come up in my old server, and why it does now.

any ideas on how to fix this ?

Because it's really annoying to get that error each time i make a new post or edit&save one.

4 Mar 07, 2011 01:16

PLease tilqi,

You know how this works. Go debug that function and report to Tblue.
Make a post that fails and output the variables that are suspicious.
You can output variables with

pre_dump( $your_variable_goes_here );

Sometimes you want to follow that output with

die();


if you can't see it on the page.

What you are looking for is your charset (UTF-8 or some Turkish locale) that doesn't convert in icvonf. My guess is you're using a standard US keyboard or somewhere along the line (either in Windows or through your browser) the locale changed to something different you're using on the blog.

5 Mar 07, 2011 20:20

i dont think Tblue supports b2evolution anymore.

btw, i have upgraded to php 5.2.13 from 5.2.9, and the error seems to be vanished for now.

6 Mar 08, 2011 10:51

argghh... no it wasnt gone anywhere.still there.and i am still waiting for ideas.

7 Mar 10, 2011 16:44

would it hurt to comment out the following lines (inc/locales/_charset.funcs.php lines 93-100) ?

	//pre_dump( setlocale( LC_CTYPE, 0 ) );

	// Transliterate the string:
	$newstr = iconv( $evo_charset, 'ASCII//TRANSLIT', $str );

	// Restore the original locale:
	setlocale( LC_CTYPE, $orig_lc_ctype );

	return $newstr;

8 Mar 10, 2011 18:25

If you comment that string you'll get URLs with accented characters.

$newstr = @iconv( $evo_charset, 'ASCII//TRANSLIT', $str );

9 Mar 10, 2011 23:53

i already convert accented(turkish) characters with a str_replace function.

would it still be a problem you think ?

i mean if i comment out those lines, and i dont get accented characters in the url, that means it's ok right ?

10 Mar 11, 2011 03:16

Just mute the function with @ sign ;)

11 Mar 11, 2011 22:09

that didnt help either... i am not worried about the error anymore, it barely appears anymore.

the thing is there is something specifically wrong with the character "ı" which is "i" without the dots.

every other turkish character is fine except that one.

the title stops at that character.For example:

"ğğüüççöŞŞşşşİİĞĞççööıııı" would turn into

"gguuccosssssiiggccoo"

Another example

"ğğııÖÖ" would turn into:
"gg" only. the title gets cut with the appearance of "ı"

12 Mar 11, 2011 22:13

You need to make sure you're using utf-8 in frontend and in the database. I remember similar errors were resolved on the forums before.

13 Mar 11, 2011 23:00

sam2kb wrote:

You need to make sure you're using utf-8 in frontend and in the database. I remember similar errors were resolved on the forums before.

i have. i double-triple-quadraple checked.

if it was such an issue, there would be problems with other characters, there is only one single character that is problematic which is "ı", i think there is something specifically wrong in this case.

14 Mar 17, 2011 10:47

the problem is still with the iconv.. however, somehow the error has been reduced to one character (dotless i , ı)

Notice: iconv() [function.iconv]: Detected an illegal character in input string in /home/tilqi/public_html/inc/locales/_charset.funcs.php on line 95

15 Feb 18, 2012 23:03

Try to replace the lowercase dotless i with some marker e.g. "zzzzzzz" before running iconv. And then replace it back after iconv.

$str = str_replace( 'dotted i', 'zzzzzzz', $str );
$newstr = @iconv( $evo_charset, 'ASCII//TRANSLIT', $str );
$newstr = str_replace( 'zzzzzzz', 'dotted i', $newstr );

16 Feb 18, 2012 23:42

$str = str_replace( 'ı', 'zzzzzzz', $str );
$newstr = @iconv( $evo_charset, 'ASCII//TRANSLIT', $str );
$newstr = str_replace( 'zzzzzzz', 'ı', $newstr );
// Transliterate the string:
$newstr = iconv( $evo_charset, 'ASCII//TRANSLIT', $str );

That didnt work.What it does:
it thinks "ı" is "i". So "i"s get converted to zzz's but "ı" problem persists. it still gets cut when the character is met.

[url=http://postimage.org/]http://s18.postimage.org/phh2razex/555_Untitled_1.jpg[/url]

17 Feb 18, 2012 23:54

Convert that file to utf-8 without BOM, save ant try again.
What file are you editing? I can send you the UTF-8 version of it

18 Feb 18, 2012 23:59

sam2kb wrote:

Convert that file to utf-8 without BOM, save ant try again.
What file are you editing? I can send you the UTF-8 version of it

Yay ! that did it.*facepalm* that didnt even cross my mind.i thought without bom was default in dreamweaver.Maybe i should default to notepad++ : D

Thanks.

19 Feb 19, 2012 00:05

I just opened your _charset.funcs.php file, and it's still encoded in ISO-8859.

You also using the replace 'i' method wrong. Remove the second

// Transliterate the string:
$newstr = iconv( $evo_charset, 'ASCII//TRANSLIT', $str );


from

$str = str_replace( 'i', 'i', $str );
$newstr = @iconv( $evo_charset, 'ASCII//TRANSLIT', $str );
$newstr = str_replace( 'i', 'i', $newstr ); 
	// Transliterate the string:
	$newstr = iconv( $evo_charset, 'ASCII//TRANSLIT', $str );

20 Feb 19, 2012 00:24

sam2kb wrote:

I just opened your _charset.funcs.php file, and it's still encoded in ISO-8859.

You also using the replace 'i' method wrong. Remove the second

// Transliterate the string:
$newstr = iconv( $evo_charset, 'ASCII//TRANSLIT', $str );


from

$str = str_replace( 'i', 'i', $str );
$newstr = @iconv( $evo_charset, 'ASCII//TRANSLIT', $str );
$newstr = str_replace( 'i', 'i', $newstr ); 
	// Transliterate the string:
	$newstr = iconv( $evo_charset, 'ASCII//TRANSLIT', $str );

well that's odd.btw you are right, i have removed the second line

21 Feb 19, 2012 02:46

So you said that the error is fixed now, right?

22 Feb 19, 2012 13:03

sam2kb wrote:

So you said that the error is fixed now, right?

yup the error is fixed, everything looks ok now.i ended up commenting 2 of the 4 lines above


Form is loading...