Re: Import XLS file with UTF-8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, August 10, 2007 8:04 am, Alain Roger wrote:
> So now i know how to import the content of the CSV file to database,
> however, before to import to database i do a simple test.
> in fact, i display in my browser all content of my CSV file.
>
> unfortunately, not all characters are displayed correctly.
> in PHP page include <meta http-equiv="Content-Type"
> content="text/html;
> charset=UTF-8"> but it does not help to display the Slovak Characters
> which
> are correctly display in EXCEL when i open the CSV file with it.
> i tried to display a standar slovak web page in my browser and it
> works
> perfectly well.
>
> So where could be the problem ?
> thanks a lot,

If the webserver is sending a DIFFERENT charset in the headers, then
the browser may be using that charset instead.

Install FireFox and LiveHttpHeaders plugin to see the headers.

Or just slap:
header("Content-type: text/html; charset=UTF-8");
in the PHP.

MS IE in particular, you actually need BOTH the HTTP header and the
META tag if you really want it to for sure use that charset.

I've had pages where IE would ignore the header and use some other
charset, to disastrous effect, until I put in the META tag. :-(

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux