Re: Is it possible to save a file with UTF-8 encoding and no BOM using PHP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, April 21, 2005 5:07 pm, Jon M. said:
> I am trying to have a file that I generated with PHP saved as UTF-8
> without
> the BOM (Byte Order Mark). Does PHP do anything like this? I am a beginner
> with PHP, but very technically experienced otherwise. I'm talking about
> the
> FILE encoding here -just to be clear.
>
> e.g.  fopen("what_ever_file", "a+") now I want PHP save the file itself
> with
> UTF-8, NOT system default.
>
> I have searched for hours to find an answer, but have not found any info
> on
> the subject.
>
> Does PHP have any ability to create a text file saved in UTF-8 encoding???

Maybe I'm just being dumb, but I think if you UTF-8 encode your data, and
http://php.net/fwrite it, you're gonna get what you want...

Dunno about the Byte-Order-Mark part, but I guess you could strip it out
of the UTF-8 encoded data before writing, if you wanted to.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux