Re: File encoding is changed by php script
| From: | Jeffry Killen | Date: | Sun, 05 Mar 2017 08:15:02 +0000 |
| Subject: | Re: File encoding is changed by php script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-326010@lists.php.net to get a copy of this message | ||
> On Mar 4, 2017, at 11:02 PM, Jeffry Killen <jekillen@prodigy.net> 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