comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: need a little string hint...
Date: 03 Mar 2005 06:19:55 +0000
Date: 2005-03-03T06:19:55+00:00	[thread overview]
Message-ID: <x7v7jkpw8s4.fsf@smaug.pushface.org> (raw)
In-Reply-To: 4224ec33$0$20669$ba620e4c@news.skynet.be

Adrien Plisson <aplisson-news@stochastique.net> 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.



  reply	other threads:[~2005-03-03  6:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-28 16:08 need a little string hint mferracini
2005-02-28 16:26 ` Adrien Plisson
2005-02-28 16:49   ` mferracini
2005-02-28 16:53     ` Andre
2005-02-28 17:29       ` Adrien Plisson
2005-03-01 21:25         ` Simon Wright
2005-03-01 22:29           ` Adrien Plisson
2005-03-03  6:19             ` Simon Wright [this message]
2005-02-28 17:49     ` Jeffrey Carter
2005-02-28 16:51   ` mferracini
2005-02-28 16:59     ` Adrien Plisson
2005-03-01  3:07 ` Steve
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox