Page 1 of 1
Is #CRLF$ obsolete?
Posted: Sun Dec 21, 2025 7:53 pm
by skywalk
Just checking since Windows 10+ respects #LF$ in most occurrences, why do we need the extra byte?
Where is #CRLF$ absolutely necessary?
Re: Is #CRLF$ obsolete?
Posted: Sun Dec 21, 2025 9:13 pm
by jacdelad
Processing text files. Like ANSI: Usually not standard anymore, but not always.
Re: Is #CRLF$ obsolete?
Posted: Sun Dec 21, 2025 10:01 pm
by idle
it's necessary for http requests if you make them manually, though I can't think of where else it's necessary.
Re: Is #CRLF$ obsolete?
Posted: Sun Dec 21, 2025 10:05 pm
by BarryG
#CRLF$ is required by standard Internet Protocols like HTTP, SMTP, POP, and IMAP.
More discussion:
https://news.ycombinator.com/item?id=41830717
Re: Is #CRLF$ obsolete?
Posted: Mon Dec 22, 2025 12:29 am
by skywalk
Yeah, I vaguely remember some special cases with email and http.
But those should improve over time.
Most controls and cmd and file editors are fine with #LF$.
Let's see how many bugs I create in my code now.

Re: Is #CRLF$ obsolete?
Posted: Mon Dec 22, 2025 8:14 am
by BarryG
It doesn't matter if it's obsolete anyway. If you don't want to use it, then don't.
Re: Is #CRLF$ obsolete?
Posted: Mon Dec 22, 2025 10:52 am
by plouf
Imho for full compatibility
For example other oses (amigaos-limux) only require 1 byte since 80s-90s
But a lot of software/protocol/logic is buolt on that logic these 3 decades
So if you want to to something on your own do it as you like
If you built something with unkown external input
Like processing text files from outside source go classical
Re: Is #CRLF$ obsolete?
Posted: Wed Dec 24, 2025 6:46 am
by skywalk
Well, my bugs are a plenty
But, not too hard to solve.
I did not realize the Windows edit control gadget does not respond to an #EM_SETENDOFLINE message?
Are the PB gadgets not Windows 10?
PB Help wrote:- GetGadgetText(): Get the text content of the editor gadget. Please note, that several lines of text are separated with "Chr(13)+Chr(10)" on Windows and "Chr(10)" on Linux and OS X.
But the api allows for #LF EOL char with the following.
Bummer, it fails, so I have to replace the EOLs.
MS API
Code: Select all
; Make EOL char = #LF
; Rich Edit Control
#EM_SETEDITSTYLEEX = #WM_USER + 275
#SES_EX_NOTABLE = 4
#EM_SETENDOFLINE = $0511
#EC_ENDOFLINE_DETECTFROMCONTENT = 0
#EC_ENDOFLINE_CRLF = 1
#EC_ENDOFLINE_CR = 2
#EC_ENDOFLINE_LF = 3
SendMessage_(#Editor, #EM_SETENDOFLINE, #EC_ENDOFLINE_LF, 0) ; Requires Windows 10+
; Fail, return 0