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