Re: cvs: php4 /ext/standard info.c

From: Date: Sun, 04 Aug 2002 20:59:09 +0000
Subject: Re: cvs: php4 /ext/standard info.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13119@lists.php.net to get a copy of this message
On August 4, 2002 04:14 pm, you wrote: > At 22:03 04.08.2002, Ilia A. wrote: > >On August 4, 2002 03:27 pm, you wrote: > > > At 20:57 04.08.2002, Georg Richter wrote: > > > >georg Sun Aug 4 14:57:02 2002 EDT > > > > > > > > Modified files: > > > > /php4/ext/standard info.c > > > > Log: > > > > added meta tag (w3c compliance) > > > > Thx to Ilia Alshanetsky (ilia@prohost.org) > > > > > > That's not really correct because the charset can be changed by ini > > > settings: output_handler = mb_output_handler > > > mbstring.http_output=<charset> > > > > > > Besides: nowhere in HTML4.01 standard is said that you need > > > "Content-Type" meta tag. Instead you should have to inform about > > > charset in http message envelope. > > > So i think the meta tag should be removed. > > > > > > marcus > > > >First here is the W3C document identifying the fact that charset is > > defined. http://www.w3.org/International/O-charset.html > > I did not say there is no such tag - i said it is not required. The w3c > says it > is important to know the charset - and the only way to do that correct is > to use the http envelope. If you wanted to use UNICODE encoding what is > default for HTML4/XHTML we had to deliver our documents with 2byte > characters and starting with either 0xFF 0xFE or 0xFE 0xFF. What can be > done by mbstring module. According to validator.w3.com output of phpinfo() does NOT generate a a HTML 4.01 compliant page. The reason for this being that the character encoding is not specified. If you want to ignore this, that's fine, let me know and I will harass you no longer about this issue. > >Since PHP's Content-Type header only contains 'text/html' it should be > >specified in a meta tag. As far as I know phpinfo() output is always in > >english regardless of the machine's charset settings, therefor charset > > should always be set to 'iso-8859-1', regardless of what the user > > generated pages send as their charset. > > The characterset used by the executable depends on the machine used to > compile it. AND everyone could use a php ini file that changes the > characterset being used for output. And using iso-8859-1 chartable has > nothing to with the language english only that english sites mostly use > that table. As soon as they get euro currency the will switch to > iso-8859-15 table that is slightly different > (just as we in germany and many other european countries did). > > If you want to send charset you can simply exclude default_mimetype and > default_charset in your php ini and use header() function to send your own > appropriate content-type http info. > > Maybe adding charset from mbstring if active s worth a patch. I'll take a > look... > I've just recompiled PHP on 3 different machines, each had a non English locale, (German, Turkish & Swedish), the output of phpinfo(), non surpsingly was still in English (I did remove php.ini file before each install). Hence, it makes no difference what locale the system uses, the output will predominantly be in English. You are forgetting that phpinfo() is a page by itself, it is silly to expect the user to have to send a header() or modify php.ini in order to get phpinfo()'s output to be HTML 4.01 compliant. Mbstring last time I checked was an extension NOT installed by default, so relying on such an extension to supply proper header information is problematic, don't you think so? Ilia

« previous php.cvs (#13119) next »