mIRC Homepage

Newline

Posted By: Voglea

Newline - 14/11/10 02:36 PM

http://en.wikipedia.org/wiki/Newline#Unicode
Quote:
The Unicode standard defines a large number of characters that conforming applications should recognize as line terminators:

LF: Line Feed, U+000A
FF: Form Feed, U+000C
CR: Carriage Return, U+000D
CR+LF: CR (U+000D) followed by LF (U+000A)
NEL: Next Line, U+0085
LS: Line Separator, U+2028
PS: Paragraph Separator, U+2029

I tested /sockread %variable and nothing works except CR+LF. Perhaps this can be corrected? for the Unicode Standard smile
Posted By: Talon

Re: Newline - 14/11/10 03:40 PM

what? just sending single characters to that given socket? /sockread is $crlf delimited unless you tell it not to be with the -f flag to force it to trigger a sockread upon ANY incomming data, rather than backbuffering until a $crlf is found.
Posted By: argv0

Re: Newline - 14/11/10 06:54 PM

mIRC recognizes CRLF (or LF) as a line delimiter. This is fairly set, and fairly common not just in mIRC, but most (unicode aware) languages. You're certainly free to treat those characters as newlines, but I actually don't know any application that, for instance, treats a CR alone as a newline. Even Windows requires CRLF to actually mark a newline in most programs-- CR alone won't cut it, even though the "Unicode standard" declares it as a terminator.

Reading the implementation caveats in the section you linked further enforces the fact that very few languages actually handle Unicode newline characters.
Posted By: RusselB

Re: Newline - 14/11/10 07:30 PM

Back in the 1980's when I was in high school, if I recall correctly (please note the time variance), there were times when we were asked to use just CR ($chr(13)) without LF ($chr(10)) in order to over-write lines printed with other lines.

The purpose of this task was to try to make it hard/impossible to read what was on the first run by other students. I didn't really understand the purpose of doing this, but that was what the instructor wanted so that's what he got.

These days, I don't know if it's possible to just have CR without LF.
© 2022 mIRC Discussion Forums