Jump to content

UTF-8 and Incorrect Display


random1

Recommended Posts

quite few, but to lithe explanation ;D

 

jokes aside. i had teh same problem to for some time. you probably made one of the files which contain your php code in a difrent code than the encoding you are giving in the header of your html.... you will have quite a mess to corect it.

 

go to all files and save them in the utf or what ever encoding you are using.

 

:D  ;D

 

Found it! In my code all page output is from a buffer that is UTF-8.

 

I changed part of my code from:

 

	// Encode HTML to UTF-8
	if($htmlencode == true)
	{
		// HTML is not UTF-8 Encoded
		if(mb_detect_encoding($buffer) != 'UTF-8' || 
			mb_detect_encoding($buffer) != 'UTF8')
		{
			// Enforce UTF-8 Encoding
			$buffer = utf8_encode($buffer);
		}
	}

 

to:

 

	// Encode HTML to UTF-8
	if($htmlencode == true)
	{
		// HTML is not UTF-8 Encoded
		if(mb_detect_encoding($buffer) != 'UTF-8')
		{
			// Enforce UTF-8 Encoding
			$buffer = utf8_encode($buffer);
		}
	}

 

Thanks for replying :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.