Web lists-archives.com

Re: [PHP] File encoding is changed by php script




> On Mar 4, 2017, at 11:02 PM, Jeffry Killen <jekillen@xxxxxxxxxxx> wrote:
> 
> I have a project that uses php script to write to a file.
> The file is itself a php script file.
> The source of the content to write to the file is a text area element
> in an html page.
> 
> The file to write to ends up with lines separated by two line breaks
> and the encoding is set to western latin.
> 
> 

I am sorry I was not swift enough to figure this out before I posted
this query. I had solve the same problem a few years ago and forgot.

I have to replace \r with \n, and then replace \n\n with \n.

Thanks for time and attention, anyway;
J



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