Page 1 of 1

file charset encoding problem?!?

Posted: Thu Sep 25, 2008 3:45 pm
by hysteric
i'm from turkey and special chars avaible in our alphabet like ?,?,?,?,ü,?,?,ç,Ç. i writing a code like that;

Code: Select all

<?php
 
$html='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>Test</body></html>';
  $open=fopen('yaz.php', 'wb+');              
  $write=fwrite($open, $html); 
 
?>
this is working. file is writing but file encoding with ANSI. if i change <body>Test</body> to like <body>??ü?iü??</body> file encoding with UTF-8. i want to file encoding UTF-8 always. but if code has not a special char like ?,? bla.. bla.. file encoding with ANSI. i don't want to add special chars just for this. how to handle to this problem?

*Sorry for my bad english :D

Re: file charset encoding problem?!?

Posted: Mon Sep 29, 2008 5:48 am
by hysteric
is anyone don't know? is problem in my english? is it much worst than that problem :D
at least write anything like your english sucks or dude, that problem is very tough.