Odd line breaks in the middle of sentences

Posts: 1105
Joined: Wed Apr 03, 2013 2:19 am

Re: Odd line breaks in the middle of sentences

Post by Jor'Mox »

Vadi wrote:I think the packet issues get translated into linebreaks because Mudlet gives up and has to display whatever data it got in leiu of a proper GA or a linebreak, and it can't just display half a line and add more later.

Thanks so much for looking into this Jor'Mox!
So, right now, packets with errors in them get turned into line-breaks, which will typically be the wrong behavior (since we have to assume that errors are evenly distributed, and line-breaks make up a very small percentage of total information being sent). Perhaps it would be better to replace them with a special, non-displaying character that the end user can trigger off of, allowing them to handle those errors as they see fit.

Granted, the ideal solution would be to fix whatever is going on that is causing the errors in the first place, but that seems relatively hard as compared to something like what I'm proposing. And, my proposal would have the added advantage of being more or less invisible to the end user a significant amount of the time, especially since from the data in the replays, these packets are actually junk packets getting interpreted as real data, as opposed to replacing actual data coming from the server. He has multiple instances of the same data being displayed, with the junk bits in different places, and in every case, if you just cut those bits out, it would match the duplicates exactly.

User avatar
Posts: 4991
Joined: Sat Mar 14, 2009 3:13 pm

Re: Odd line breaks in the middle of sentences

Post by Vadi »

That makes sense. I wonder how does mushclient ha dle this as well.

Could you file this on https://github.com/Mudlet/Mudlet with your idea?

User avatar
Posts: 1001
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Odd line breaks in the middle of sentences

Post by SlySven »

@Vadi - we might have to think about that - once we start getting into Utf-8 we get into a stateful (?) encoding and cannot say - OK lets go with the stuff we have got and come back later for more data/bytes, oh, and lets finish this chunk off with a line feed.

Though, with a buffer with space for around 30-ish codepoints (as unicode.org suggest should be used #UAX15-D3) it IS possible to establish a suitable text-boundary during stream-safe re-normalisation {i.e. establish that another codepoint added to the existing data will not cause how the preceding text is to be displayed to change} - and thus be a point at which a break/gap could be placed, with the tail end (remaining bytes/codepoints) of the data being held until the next packet of data arrives.

User avatar
Posts: 172
Joined: Wed May 09, 2012 8:07 am
Location: mg.mud.de

Re: Odd line breaks in the middle of sentences

Post by Zaphob »

sighfigh wrote:
Wed Mar 22, 2017 2:55 pm
I have been wanting to transition to Mudlet for a long time but have never made the leap because I get these weird line breaks (...)
This has now been fixed and can be tested with the latest PTB or next Mudlet release version! :)

Post Reply