ID: 11951
Updated by: joey
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Any
PHP Version: 4.0.5
Assigned To: 
New Comment:

Have you checked the default_charset in your php.ini?

Previous Comments:
------------------------------------------------------------------------

[2001-07-07 18:18:16] [EMAIL PROTECTED]

There definately seems to be a problem using any operating system I've tried (Linux 
Debian, RedHat, Windows 98, Windows 2000). The problem is that the following piece of 
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" CONTENT="text/html; charset=windows-1251">
.......

will somehow be ignored, i.e. the document will not have this encoding set, instead 
ISO-8859-1 will be used. The biggest problem is that if try to change the encoding in 
the browser it won't change it, even though the browser will show it changed or if it 
changes it (very rare), after you reload the page the encoding is set back to 
ISO-8859-1, even though the browser always shows that the encoding is changed. This 
happens for all files that are processed by the php engine. I've correctly set the 
encoding option in the php.ini, even though it is always best for php, not to set this 
at all, since if you're using a remote server, for example hosting you site in the 
USA, but the page is in cyrillic, your php pages will never display properly. Probably 
the best thing is to leave the encoding up to the HTML headers set by each page.

My workaround for this problem is (it always works correctly):
<?
  include "set_encoding.inc";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" CONTENT="text/html; charset=windows-1251">
........

where set_encoding.inc, contains in my case the following:
  header("Content-type: text/html;charset=windows-1251");
  header("Content-Language: bg");



------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11951&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to