Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21409 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97349 invoked by uid 1010); 4 Jan 2006 12:05:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 97334 invoked from network); 4 Jan 2006 12:05:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2006 12:05:39 -0000 X-Host-Fingerprint: 129.177.30.12 noralf.uib.no Solaris 9 Received: from ([129.177.30.12:60621] helo=noralf.uib.no) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id F6/55-34518-21ABBB34 for ; Wed, 04 Jan 2006 07:05:38 -0500 Received: from alfred.uib.no (smtp.uib.no) [129.177.30.120] by noralf.uib.no with esmtp (Exim 4.34) id 1Eu7OW-0002rZ-AE; Wed, 04 Jan 2006 13:05:34 +0100 Received: from tunnel-44-60.vpn.uib.no [129.177.44.60] by smtp.uib.no for internals@lists.php.net with esmtp (Exim 4.34) id 1Eu7OW-0005a7-54; Wed, 04 Jan 2006 13:05:32 +0100 Reply-To: freejay@freejay.it Organization: ZeroNotice IT Solutions To: internals@lists.php.net Date: Wed, 4 Jan 2006 13:05:19 +0100 User-Agent: KMail/1.9 References: <200601041042.47383.freejay@freejay.it> <7.0.0.16.0.20060104114047.03eea370@thetaphi.de> In-Reply-To: <7.0.0.16.0.20060104114047.03eea370@thetaphi.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5496492.scEgzv1y63"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-ID: <200601041305.21688.freejay@freejay.it> X-checked-clean: by exiscan on noralf X-Scanner: 726369ab2e1bdae374ff373ac9da80b1 http://tjinfo.uib.no/virus.html X-UiB-SpamFlag: NO UIB: -0.4 hits, 8.0 required X-UiB-SpamReport: spamassassin found; -0.4 Did not pass through any untrusted hosts Subject: Re: [PHP-DEV] Default charset From: freejay@freejay.it (Graziano Liberati) --nextPart5496492.scEgzv1y63 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline At Wednesday 4 January 2006 11:45, Uwe Schindler you wrote: > create a .htaccess file in the application directory where you use > the "php_value" command to set this variable. See > http://www.php.net/php_value > > The problem is that changing the charset in the script is too late > (it is running so it cannot be changed anymore). Why it's too late? The content type (so also the charset) is not setted unt= il=20 the first instruction of output, for example I can use (as said by Rasmus) header("Content-type: text/html; charset=3DUTF-8"); =46rom the manual: " Remember that header() must be called before any actual output is sent,=20 either by normal HTML tags, blank lines in a file, or from PHP. It is a ver= y=20 common error to read code with include(), or require(), functions, or anoth= er=20 file access function, and have spaces or empty lines that are output before= =20 header() is called. The same problem exists when using a single PHP/HTML=20 file." Regards. =2D-=20 Graziano 'FreeJay' Liberati =2D-------------------------- Main developer of ZNF http://znf.zeronotice.com Contacts web: http://www.freejay.it e-mail: freejay@freejay.it icq: 98659824 msn: freejay@freejay.it --nextPart5496492.scEgzv1y63 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDu7oBwrli1BP8ELoRAsSbAKCG5xteDYi+ImAmLsWOUYYxiuVwZQCfSLsZ U/dziq3Q8ufp2tELqAg79bo= =uML4 -----END PGP SIGNATURE----- --nextPart5496492.scEgzv1y63--