TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#read problem

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
adventurer



Joined: 03 Sep 2010
Posts: 11

PostPosted: Mon Oct 01, 2012 12:31 pm    Post subject: #read problem Reply with quote

Hello.

I'm not sure if it is bug, but it looks like one for me.

When you #read file which content starts with '_', the "tintin char" in config will change to '_'.
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Mon Oct 01, 2012 4:07 pm    Post subject: Reply with quote

No, that is not a bug, it is a design feature! Big Smile

Given that a file will start with a command, typically an #ACTION if it has been written by TinTin++ itself, the very first character read will be the tintin command character, but if the user has specified something other than the default '#' then it has to assume that the first character it sees IS the command character so the configuration is set accordingly... Cool

{At this point I am starting to see a thought along the lines of the "Chicken and Egg" paradox!}

Ironically enough the point where a command character would otherwise be set is in the #CONFIG {TINTIN CHAR} entry which TinTin++ itself writes some way into a script file if it writes one out. The only other way to avoid such a paradox is to make this #CONFIG {TINTIN CHAR} entry (with that default leading '#') to always be the first command written in a script file... Totally Sweet (do you have any thoughts Mr. Scandum?)

One side effect of this that I have found is that in a M$ Windoze environment some text editors (notepad.exe for example) if told to save a file with Unicode encoding (for instance if you have set #CONFIG {CHARSET} {UTF-8} and want to use characters above the ASCII characters ranges 32-127 for map symbols) may set the very first thing in the file to be an invisible ByteOrderingMark (BOM) character which it won't show but can confuse TinTin++ as well as most "proper" *nix text handling programs. The upshot is that if given a file format choice to save a script for TinTin++ in by the text editor you use for scripts I would suggest either "ASCII" or "UTF-8 without BOM".

(In notepad.exe on my Windoze XP PC it offers "ASCII", "UTF-8" coding which adds this BOM, "Unicode" coding which produces UTC-2 Little Endian encoding and "Unicode big endian" UTC-2 Big Endian - none of which I think is what is wanted...)

For what it is worth I have found the free "Notepad++" a useful editor in this respect. Coffee
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group