Re: Downloading utf-8 encoded files

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

 



On Tue, 26 Dec 2006 17:22:39 +0500, "Fahad Pervaiz" wrote:

> I want to download UTF-8 encoded kml files from a website. I have written a
> script that automatically downloads KML file. Problem is that some of the
> utf-8 charc are distrubed after saving file on windows. below is the script.
> 
>    $handle = fopen($link, "rb");
> 
>    $handle2= fopen("kml/$i.kml","w");

Using binary mode in both streams might help:

   $handle2= fopen("kml/$i.kml","wb");
                                ^^^^

--nfe

-- 
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