Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Running the server
➜ Room Description Layout Issues
Room Description Layout Issues
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #15 on Wed 07 Feb 2007 09:32 PM (UTC) |
Message
| As far as I can see, some MUDs (SMAUG springs to mind) tend to send a combination of \r or \r\n to mark end of lines. For example, internal code tends to use \r\n (for some reason), however routines that "dump" a file to the client (eg. a help file) tend to send it "as is" which will generally be with only \n at the end of lines, if the file was edited under Unix.
This means that a standard telnet client will "sort of" work, which isn't particularly helpful.
What MUSHclient does, and I imagine others do too, is do this:
- Discard \r totally - to avoid the double-spacing issue
- Start a new line at \n
However MXP tags can modify that behaviour too, making lines wrap around, even after a \n (like HTML does).
This behaviour can sometimes lead to problems, such as MUDs that do things like a "milestone count" by sending something like:
\r 10% \r 20% \r 30% ... and so on
In this case, the \r is supposed to return the cursor to the start of the line, to "wipe out" the previous percentage.
There is an option in MUSHclient for \r to "clear the line" which effectively should make that sort of stuff work. I know it isn't perfect, as \r isn't supposed to actually clear the line, however for the sort of situation described above, that is acceptable. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #16 on Wed 07 Feb 2007 09:40 PM (UTC) |
Message
| Ok, so I kinda had the client interpretation backwards, but based on this excerpt from the telnet protocol whitepaper (http://www.faqs.org/rfcs/rfc854.html)
Quote:
The sequence "CR LF", as defined, will cause the NVT to be
positioned at the left margin of the next print line (as would,
for example, the sequence "LF CR"). However, many systems and
terminals do not treat CR and LF independently, and will have to
go to some effort to simulate their effect. (For example, some
terminals do not have a CR independent of the LF, but on such
terminals it may be possible to simulate a CR by backspacing.)
Therefore, the sequence "CR LF" must be treated as a single "new
line" character and used whenever their combined action is
intended; the sequence "CR NUL" must be used where a carriage
return alone is actually desired; and the CR character must be
avoided in other contexts. This rule gives assurance to systems
which must decide whether to perform a "new line" function or a
multiple-backspace that the TELNET stream contains a character
following a CR that will allow a rational decision.
The actual clients are following the standard as written. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
55,685 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top