CRLF added in content.htm

Questions about how to install and problems installing - please read the documentation first!
olape
Posts: 3173
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: CRLF added in content.htm

Post by olape » Thu Jul 04, 2024 7:35 am

ludovicam wrote:
Thu Jul 04, 2024 6:11 am
I open the local server (easyphp devserver), I open the local site, go to the admin and modify the template then record the action.

The Local Template.htm file is immediately transformed into CRLF.
This would be correct if you are working under Windows.
ludovicam wrote:
Thu Jul 04, 2024 6:11 am
The content.htm file previously converted to LF is with an LF/CRLF mix because the part concerned by the article modified to all its lines ended by CRLF.
That is not correct, I think so.
We have not yet observed this or noticed it. I will try it out when I get the chance.
ludovicam wrote:
Thu Jul 04, 2024 6:11 am
I wonder if we can configure something for a local server -In a Windows environment- to work like a UNIX server
I can't answer that. That would have to be researched.
Gruß Olaf, Plugins for CMSimple_XH

Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.

ludovicam
Posts: 39
Joined: Tue May 29, 2018 8:23 pm
Contact:

Re: CRLF added in content.htm

Post by ludovicam » Thu Jul 04, 2024 8:06 am

I confirm that I work under Windows 10. I have no other way.

olape
Posts: 3173
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: CRLF added in content.htm

Post by olape » Thu Jul 04, 2024 8:37 am

olape wrote:
Thu Jul 04, 2024 7:35 am
I will try it out when I get the chance.
- Original content.htm is delivered with LF.
- local changes under Windows / xampp result in a mix of LF and CRLF
CRLF is only set in the content, not in the Pagedata part and only for the page that was edited.

- however, a CORRECT transfer with Filezilla (ascii mode) corrects that again.
on a Linux server, EVERYTHING arrives with LF.
Conversely, if I then download the file again in ascii mode on a Windows OS, EVERYTHING is CRLF.

Correct FTP transfer cannot be the solution, but it does alleviate the problem considerably.
Gruß Olaf, Plugins for CMSimple_XH

Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.

ludovicam
Posts: 39
Joined: Tue May 29, 2018 8:23 pm
Contact:

Re: CRLF added in content.htm

Post by ludovicam » Thu Jul 04, 2024 9:14 am

The author of this post deemed useful to delete it.
Last edited by ludovicam on Fri Jul 05, 2024 2:32 pm, edited 1 time in total.

ludovicam
Posts: 39
Joined: Tue May 29, 2018 8:23 pm
Contact:

Re: CRLF added in content.htm

Post by ludovicam » Fri Jul 05, 2024 1:16 pm

I found a small solution that requires modifying a native function. I therefore do not publish it in case it could lead to "other problems". We never know.
Last edited by ludovicam on Fri Jul 05, 2024 2:20 pm, edited 1 time in total.

olape
Posts: 3173
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: CRLF added in content.htm

Post by olape » Fri Jul 05, 2024 1:37 pm

ludovicam wrote:
Fri Jul 05, 2024 1:16 pm
This is the simplest path I have found.
:D
OK, let's remember that for now.
So far, apart from you, we are not aware of anyone who has experienced this problem.
This will inevitably be a long-term test for you.

I hope to hear again in the future whether your solution might cause other problems.
Gruß Olaf, Plugins for CMSimple_XH

Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.

ludovicam
Posts: 39
Joined: Tue May 29, 2018 8:23 pm
Contact:

Re: CRLF added in content.htm

Post by ludovicam » Fri Jul 05, 2024 2:22 pm

I hope to hear again in the future whether your solution might cause other problems.
We all hope.
the subject is closed.

Michael_G
Posts: 203
Joined: Thu Feb 18, 2016 11:01 pm
Contact:

Re: CRLF added in content.htm

Post by Michael_G » Fri Jul 05, 2024 10:37 pm

Hi,

maybe this link can also help:
https://superuser.com/questions/545461/ ... in-notepad

Or short and BTW my experience for years:
Standard line endings: macOS/Unix (LF)

Real good text editors like Notepad++ for Windows and CotEditor for macOS support to choose between:
– macOS / Unix (LF)
– Windows (CRLF)

Every Webmaster using a Linux web server should set this to macOS/Unix (LF) to avoid problems.
Good luck!
Ciao
Michael

Let's Encrypt!

olape
Posts: 3173
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: CRLF added in content.htm

Post by olape » Mon Jul 08, 2024 5:24 am

Michael_G wrote:
Fri Jul 05, 2024 10:37 pm
Real good text editors like Notepad++ for Windows and CotEditor for macOS support to choose between:
– macOS / Unix (LF)
– Windows (CRLF)
Although this is true, it is of no use if someone uses the XH editor to edit page content.
Michael_G wrote:
Fri Jul 05, 2024 10:37 pm
Every Webmaster using a Linux web server should set this to macOS/Unix (LF) to avoid problems.
Linux servers always use LF by default.

There is indeed a problem here at XH, but it doesn't seem to have come into play anywhere yet. In any case, I didn't know anything about it yet.
Gruß Olaf, Plugins for CMSimple_XH

Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.

Michael_G
Posts: 203
Joined: Thu Feb 18, 2016 11:01 pm
Contact:

Re: CRLF added in content.htm

Post by Michael_G » Sun Jul 21, 2024 9:38 pm

Hi olape,

yes, XH seems to mix “LF” and “CRLF” above a certain content.htm size.

I use macOS and the excellent CotEditor and have often been surprised by its message that the loaded content.htm file complains about "inconsistent line endings" and then always offers to correct them.
I did this and everything worked fine.

But even if I ignored this message from my editor, I had no problems in XH.
My texts were not affected by these incorrect line endings.

I have just loaded the content.htm files (DE|EN) of my small website into CotEditor as a test (â 66 KB)
and then the two content.htm files (DE|EN) of my large website (DE+EN each about 3 MB in size).

* Edit:
Conclusion: all online within XH edited content.htm files are partially modified by XH with unwanted “CRLF”.
I have not yet recognised any logic in this.
Last edited by Michael_G on Mon Jul 22, 2024 8:53 pm, edited 1 time in total.
Ciao
Michael

Let's Encrypt!

Post Reply