mIRC Home    About    Download    Register    News    Help

Print Thread
Newline #227559 14/11/10 02:36 PM
Joined: Nov 2009
Posts: 81
V
Voglea Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Nov 2009
Posts: 81
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

Re: Newline [Re: Voglea] #227562 14/11/10 03:40 PM
Joined: Dec 2002
Posts: 234
T
Talon Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 234
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.

Re: Newline [Re: Voglea] #227566 14/11/10 06:54 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Newline [Re: argv0] #227567 14/11/10 07:30 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.