Mark's Tech Stuff
Programming solutions, source code, solutions to tech problems and other tech related stuff.
Wednesday, October 03, 2012
php save file as utf-8
$file_contents = "Mañana";
$path_to_file = "myfile.txt";
$f=fopen($path_to_file, "wb");
$file_contents="\xEF\xBB\xBF".$file_contents; // utf-8 bom
fputs($f, $file_contents);
fclose($f);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment