From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,341ea6d4f1d28719 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!proxad.net!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: need a little string hint... Date: 03 Mar 2005 06:19:55 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <1109606915.447479.184780@l41g2000cwc.googlegroups.com> <4223462d$0$30168$ba620e4c@news.skynet.be> <1109609391.989190.235510@f14g2000cwb.googlegroups.com> <422354fb$0$14965$ba620e4c@news.skynet.be> <4224ec33$0$20669$ba620e4c@news.skynet.be> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1109830880 4010 62.49.19.209 (3 Mar 2005 06:21:20 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 3 Mar 2005 06:21:20 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: g2news1.google.com comp.lang.ada:8592 Date: 2005-03-03T06:19:55+00:00 List-Id: Adrien Plisson writes: > Simon Wright wrote: > > Of course you may not be talking about DNS -- but I'm pretty sure that > > under DNS legal hostname characters are [a-z0-9.-] (case insensitive) > > which doesn't include space. > > it depends: look at IDN (Internationalized Domain Names), it allows > to have Unicode characters in domain names. it then depends if your > configuration file should hold only the ASCII-compatible value, in > which case my remark is invalid, or if it is allowed to hold the > non-encoded Unicode value, in which case trimming spaces will > certainly yield a different result from the actual hostname in the > file. I did wonder whether IDN would affect matters .. > > A text-based config file format that includes significant > > whitespace as you suggest and doesn't delimit it (eg, with quotes) > > is asking to be derided. Just look at make(1). > > there is also a problem of incompatibility: if the configuration > file is intended to be read by many (> 1) different softwares, they > all have to handle spaces the same way. i don't think trimming > spaces is a common operation on hostnames, so he had better no do it > this way. Nothing to do with host names, just the config file format -- which must be defined somewhere. For example, the hosts(5) format bans spaces (non-printables, rather) in host names entirely, not just at the ends! IP_address canonical_hostname aliases Fields of the entry are separated by any number of blanks and/or tab characters. -- Simon Wright 100% Ada, no bugs.