Re: Stripping accents from characters as they pass through a stream and then written to file
| From: | Marc Guay | Date: | Mon, 14 Jan 2013 15:19:19 +0000 |
| Subject: | Re: Stripping accents from characters as they pass through a stream and then written to file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320088@lists.php.net to get a copy of this message | ||
If I try and simplify this by skipping the stream business and just
write to file directly from main.php, I have the same problem.
$fd = fopen('log.txt', "a");
$val = iconv('UTF-8','ASCII//TRANSLIT',"é");
fwrite($fd, $val);
=
? in an ANSI encoded file.
If it helps anyone to understand this I'm following advice found here:
http://stackoverflow.com/questions/3371697/replacing-accented-characters-php.
Marc