Re: [PHP] File encoding is changed by php script
[email protected] (Jeffry Killen)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
> On Mar 4, 2017, at 11:02 PM, Jeffry Killen <[email protected]> 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