Register forum user name Search FAQ

Gammon Forum

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 ➜ MUSHclient ➜ Bug reports ➜ MAJOR BUG - Nonprinting characters prevent world loading!

MAJOR BUG - Nonprinting characters prevent world loading!

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Neva   USA  (117 posts)  Bio
Date Mon 27 Jan 2003 01:12 PM (UTC)
Message
Because there are so-called 'nonprinting' characters used as control sequences, and I use those control sequences for triggers... now I can't load the world, because it just kicks out and says that the nonprinting characters make the triggers invalid!

This means that my world is broken and I have to go edit the whole thing even though the triggers themselves *work* just fine.

This error message means that I'm going to have to manually edit my world file... and then manually edit my triggers after I load it to make it actually *work*.
Top

Posted by Shadowfyr   USA  (1,791 posts)  Bio
Date Reply #1 on Mon 27 Jan 2003 08:34 PM (UTC)

Amended on Mon 27 Jan 2003 08:35 PM (UTC) by Shadowfyr

Message
If the triggers use the 'standard' non-regular expression version then I am not surprised. The client should probably warn if you do such and refuse to add the trigger, instead of waiting until the next time it loads the world file. However, if you used a regular expression (which is designed for handling odd things) then you could use the \xhh escape code in the expression, just give it the Hex code version of the character. For instance to process ANSI yourself you would use something like '/x1B[(.*)m' Which would grab all the number codes in the sequence. Of course this would be counter productive, but it does show how it works. ;)

On the other hand.. In most older terminal types, especially those used for BBS access, any do called non-printing character was accepted, diplayed and triggered on if not used by the display protocal itself, so it could be useful if such stuff was left alone.

Of course that was 'before' MS and others desided that the DOS font was apparently too consistant and started using fonts that don't bother to even provide a displayable character for anything that qualifies as a control code (or about 50% of the characters above decimal 127 as well)... lol This fact is made even more fun when you consider that the font built into all PC video cards is the DOS Font, but the new 'standard' fonts have what characters they do display in those ranges in different places, so that the original DOS font no longer matches. I use the DOS Terminal font due to the fact that I think it looks better and is one of only 3 that are fixed width, but at times, like when someone types a foreign word on a mud and what was supposed to be an 'a' like character ends up being something completely different, it is a major pain.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Mon 27 Jan 2003 09:03 PM (UTC)
Message
Can you tell me which non-printing characters you are using exactly (eg. ctrl+G or the hex equivalent)?

I thought that the world-write and read were symmetrical but perhaps they are not.

Judging by the code you will have problems with characters in the range 0 to 31 decimal.

This might have to wait for another version to have an option to allow non-printable characters.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 27 Jan 2003 09:04 PM (UTC)
Message
I have added this as suggestion #482.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Neva   USA  (117 posts)  Bio
Date Reply #4 on Mon 27 Jan 2003 10:33 PM (UTC)
Message
 -- That's the character in question being used. No, I don't know what it is, exactly.

The thing is, if the triggers *work*, and text editors can edit the file just fine, and all that, there's *no good reason* that MUSHclient should kick it out. The triggers are catching the text and sending what they're supposed to. That isn't the trouble. It runs, it doesn't do anything wrong to the file, it appears that the only problem is that it's builtin to kick it out when it finds a character like that.

And if the client *functions* when using those characters in triggers and the like, functions when receiving them in output, doesn't mind them just as a general thing... then there's no reason for it to error out when trying to load the file.

I don't know if you *get* exactly what kind of trouble this causes me. I now have to go in and specifically *remove* all those characters before closing the world, save it that way, and go back and put them back *in* prior to connecting *every single time* I use that world. The fact that this isn't being seen as vital when it adds about *ten minutes* to my startup and shutdown *every day* makes me extremely angry. There's a reason I registered this, and it wasn't to have major bugs like this treated like 'suggesions'.
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #5 on Tue 28 Jan 2003 01:29 AM (UTC)
Message
Neva, grow up. For starts, Nick's "suggestions" are essentially his feasibility study and todo list for MC. Not every user request is possible to include in the program for various reasons. The fact that the triggers fire once the world is up is highly independant of any function they may have at a compiler level when attempting to load that same world. As for your irritation at the time it takes you to reconfigure your triggers every time you open or close the world, perhaps you could find a way to not use the unprinted chars as part of the triggers instead of insisting Nick fix something that may very well not be possible due to code functionality conflicts. As for your attitude in your last post, if I was Nick, your help would be at an end because you obviously don't understand the concepts of professionalism or courtesy.

Harsh? Probly but Im just tired enough of ppl actin stupid because they're unhappy with how someone handles them not doing even the most basic of research into the cause of a problem or don't immediately jump to find a way to idiotproof their product that I really don't care anymore.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by Neva   USA  (117 posts)  Bio
Date Reply #6 on Tue 28 Jan 2003 01:58 AM (UTC)
Message
When something is a *bug*, it shouldn't be added as a *suggestion*. Whether it can be fixed immediately or not. It's a bug, it's not a suggestion for enhancement. And considering that importing XML is essentially loading text and then parsing it, and other text editors do not in fact choke on this character, I don't think we're talking about something which is a complete impossibility for MUSHclient at this time. The original post was *not* asking for these characters to be supported in triggers; they already are. The original post was reporting an error in startup when the world *included* these characters in triggers.

That's a bug.

Complete failure to read a world which MUSHclient itself has written and performed for hours straight flawlessly using is not a needed extension; that's an error, not a feature that's lacking. And when it's immediately blown off as *being* a lacking feature, that's very upsetting.

All it needs to do is just accept that yes, if it reads non-printable characters out of this 'match' attribute, they're supposed to be there, and send them right on the way it finds them. It's even okay with me if it still prints out an XML warning--it's just not okay that it aborts the entire thing and refuses to read the file.
Top

Posted by Shadowfyr   USA  (1,791 posts)  Bio
Date Reply #7 on Tue 28 Jan 2003 02:13 AM (UTC)
Message
It is a suggestion, since as I tried to point out you can still match on those characters as well as save and load the file 'if' you use regular expressions and a /xhh escape code. Thus you don't have to remove them all. Though... I am not sure if the 'convert to regular expression' button correctly swiches them to the right escape code. Admittedly my suggestion is a stop gap measure, but it should fix the problem, the only real question being if you know what the hex value of the character actually is it need to test for.

No one likely expected such characters to be valid, since they are generally only seen in mud sent command codes, codes that are ignored if the client doesn't support them. Most programs like Wordpad don't allow the characters in the 0-31 range at all (or try to use them for something else) and many editors like MS Notepad will flat out stop loading at the first NULL (character 0) they encounter. Most people wouldn't consider this to be an oversite. Also, who is to say that Nick didn't put it into the bug section and simply mistate where he placed it?
Top

Posted by Neva   USA  (117 posts)  Bio
Date Reply #8 on Tue 28 Jan 2003 03:00 AM (UTC)
Message
No, it doesn't convert it when it converts to a regular expression, and I've got no way of knowing exactly what it's supposed to be.

Neither Notepad nor Wordpad has any trouble whatsoever loading the world file.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #9 on Tue 28 Jan 2003 04:39 AM (UTC)

Amended on Tue 28 Jan 2003 04:47 AM (UTC) by Nick Gammon

Message
Hmm - I see the fur has been flying while I have been researching my reply. Neva, I try to support my software - less than 24 hours have elapsed and I believe I have a workable solution for you, partly thanks to Shadowfyr who reminded about the \xhh codes in regular expressions - thanks Shadowfyr. :)

Quote:

- That's the character in question being used. No, I don't know what it is, exactly.


How do you type it in if you don't know what it is?

Judging by your post, the character is hex 1C, which is Control-backslash.

However, if you go into "edit trigger" you can't type control-backslash into the "trigger" or "sent" fields. I am presuming that you are doing a copy and paste to get the character into those fields.

I was surprised to find a "major bug" in the loading/saving of worlds - this technique of using XML world files has been in MUSHclient since version 3.21 - released on 16th May 2002, over 7 months ago. No-one else has commented or complained, and if they had I would have looked into it.

My downloads web page warns about incompatibilities between version 3.21 onwards and earlier versions, particularly in saving world files, and advises you to back up your world files before upgrading. If you had done this then you could have stuck with the earlier version whilst this issue was resolved. The extra 10 minutes per day then wouldn't have been necessary.

Quote:

Neither Notepad nor Wordpad has any trouble whatsoever loading the world file.


Yes, they read them into memory, of course, because they treat a file as a block of data, they don't "parse" it. The fact that you cannot say what the character is, is surely some indication that it is an unusual character.

I deliberately built that check into the parsing routine, to stop "rubbish" getting into your world file - such as your character. You can't "look" at it - it just shows up as a black blob, and it isn't obvious what it is. I was suggesting that as a "suggested enhancement" the check could be disabled.

I stick by my earlier comment that if you can't type a character into the GUI dialogs, then it isn't that unreasonable for the client to not support loading it. For instance, you would have trouble putting the "tab" character into a trigger, because pressing tab moves from one field to another. However you can obviously fool it by copying it from a different program and pasting it. This is how you got the character into the trigger in the first case, I would guess.

Quote:

And considering that importing XML is essentially loading text and then parsing it, and other text editors do not in fact choke on this character,


MUSHclient hasn't choked - it has hit a design decision, indicated by a proper error message. I made a conscious decision to limit characters in the range 0 to 31 decimal, and your character failed that test. A major reason for that decision is that such characters cannot be represented on the screen (they all show up as black rectangles) and thus are pretty useless in the GUI interface, plus as a secondary consideration I had not heard of MUDs using such characters, other than as ANSI control codes (eg. colours) which are already correctly dealt with.

Solution

However having said all that, there is a solution. :)

Simply make your triggers (the ones with the problem) regular expressions if they are not already (click on the "convert to regular expression" button) and then change that character to be:


\x1c


That will make the regular expression parser convert the character "on the fly" and thus it can be saved and loaded without problems in the world file.



PS - as for the comments about "bugs" and "suggestions" I have a bugs/suggestions database, into which I place things to be implemented in future versions. My comment was merely intended to reassure you that your message hadn't been forgotten and was "on the database". There is a cross-over between bugs and suggestions - one person's bug might be another person's suggestion. For example, if I had allowed non-printable characters in, someone might have stuck them into an XML file, and then complained that they were *not* rejected.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadowfyr   USA  (1,791 posts)  Bio
Date Reply #10 on Tue 28 Jan 2003 06:48 PM (UTC)

Amended on Tue 28 Jan 2003 06:55 PM (UTC) by Shadowfyr

Message
Just one comment.. ;) In so called 'modern' fonts the 0-31 range is nothing but black boxes. In the original Terminal/DOS font, every character is represented by some form of displayable object. This is also the case of a few specialty fonts. One solution could have been to make the 0-31 range appear in the DOS font, but that would have only made things a bigger mess.

I am not sure the checks need to be done in the XML load, anymore than I am sure it is a good idea to remove them, but one things that is needed is the ability to convert that range to the correct hex code in the regular expression syntax. After all if you can't 'see' what it is visually, you can't even guess what the correct code will be. It 'could' be possible to take the offending character and do something like /world.note hex(asc("-your character here-")), but that is a poor solution to a problem that publishers should never have created to begin with imho. Also I personally I think a note to the effect that those characters are only available if using regexp would be a more than reasonable assumption, if it was fixed to convert correctly.

On a side note: I have to say that the refusal to provide real characters for the dead ranges in most fonts is a major pain as far as I am concerned. It makes looking at a file using a hex editor frustrating, some fonts contain sections that are used, but not used in others, so changing a block of text between them can be a mess at the very least, etc. It is very inconsistant and in some cases makes fonts quite useless. However the thing that bugs me most is that the only fixed width terminal font available that doesn't make the same useless assumptions about things being 'printable' and therefore not displayable is the one font who character organization was abandoned in favor of the more common ordering that DTP font developers chose. :p Worse, programs like Windows Character Map ignore anything in the 0-31 range, even if the font contains them (and several do). What I wouldn't give for one decent, good looking, fixed width font that actually provided characters in every available range, but it is next to impossible to just plain find a fixed width font, let alone a good one.
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.


26,470 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.