Writing ascii file

Hi Guns,
Writing a new file throught php, automatically it obtain an UTF-8 (without BOM) encoding if the input-text contained any not-ascii characters.
I need the ascii-encoding for the new file outputed (because it is a robots.txt).
In the statement fwrite($pointer, $rows[$n].“\r\n”) $rows contains only ascii characters.
But the result is a robots.txt without encoding !!!
It can be that this doesn’t creates problems for search engines, but when in doubt… please, how I must do… to obtain a file txt in ascii encoding?

For a file there is not such attribute like encoding.
So, all you can talk about is a file content’s encoding.
Which you already managed to make right.

So I think that your file is OK already.

While for the URLs (and your robots.txt for the Google is not a file but URL) encodingcan be set, through HTTP headers. You may always change particular URL’s encoding through your web-server’s configuration.

OK, thank’s Colshrapnel: now I go to study :smiley:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.