Re: Japanese with UTF-8 and mysql
| From: | Mark Sargent | Date: | Thu, 09 Jun 2005 05:21:47 +0000 |
| Subject: | Re: Japanese with UTF-8 and mysql | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-216686@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
On Mon, June 6, 2005 11:02 pm, Mark Sargent said:The correct way - if one wants utf-8 as charset - is: header("Content-Type: index/html; charset=utf-8");actually, if I add this, header("Content-Type: index/html; charset=utf-8"); as suggested, firefox prompts to download the page, instead of just displaying the page. You have chosen to openSigh. me tooproductdetails.phpwhich is a : PHP file from: http://localhost/ What should firefox do with this file? Open with Browse.. Save to disk Weird, what's with that. Cheers.
I think they implemented the IE bug that looks at URLs instead of Headers in some cases. actually, get this in both Firefox and Mozilla
Rename your PHP script to be .htm, done
and then use .htaccess with ForceType to make it really be a PHP script. <Files productdetails.htm> ForceType application/x-httpd-php </Files> just checking; that goes into the .htaccess file, which is placed in the same dir as the files for this site..?
Then the browser CAN NOT KNOW you used PHP to generate the file, so cannot possibly screw up... if above is correct, it did, with the renamed productdetails.htm page...this is after restarting the server too..did I misunderstand something.?
Well, at least it can't screw up in the way it is doing now. :-) perhaps it's just me..?Cheers. Mark Sargent.