X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Fri, 9 Oct 2009 15:44:23 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Cc: XEmacs developers <xemacs-beta@xemacs.org>
Subject: Re: Segfault under cygwin 1.7.62
Message-ID: <20091009134423.GL12789@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com, XEmacs developers <xemacs-beta@xemacs.org>
Mail-Followup-To: cygwin@cygwin.com, 	XEmacs developers <xemacs-beta@xemacs.org>
References: <20a807210910071714t45136fd7hc36108c990377bc4@mail.gmail.com> <87pr8yqmdt.fsf@uwakimon.sk.tsukuba.ac.jp> <20a807210910080843k50c4cbddtb06ad474b3195a03@mail.gmail.com> <87ws35pwbg.fsf@uwakimon.sk.tsukuba.ac.jp> <20a807210910081950v80a4da9ga5ed1265dfca07ef@mail.gmail.com> <416096c60910082305y2f0783a5i95b2adac872831bd@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <416096c60910082305y2f0783a5i95b2adac872831bd@mail.gmail.com>
User-Agent: Mutt/1.5.17 (2007-11-01)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

[Send again to include the XEmacs list]

On Oct  9 07:05, Andy Koppe wrote:
> \001's and the tab at the end.
>
> $ touch $'\001' $'\t'
> touch: cannot touch `\001': No such file or directory
> touch: cannot touch `\t': No such file or directory
> 
> In fact it appears that no control chars are allowed in filenames.

Indeed, and it's even documented.

http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#basic_naming_conventions

  Use any character in the current code page for a name, including Unicode
  characters and characters in the extended character set (128–255),
  except for the following:

    * The following reserved characters:
          < > : " / \ | ? *
    * Integer value zero, sometimes referred to as the ASCII NUL character.
    * Characters whose integer representations are in the range from
      1 through 31, except for streams. For more information about file
      streams, see File Streams.
    * Any other character that the target file system does not allow.

If there's actually a demand to allow filenames with control chars,
we can do this by using the same technique described here:

http://cygwin.com/1.7/cygwin-ug-net/using-specialnames.html#pathnames-specialchars

So we create control chars as special Unicode characters in the private
use area U+f0XX.  It's a very easy change in Cygwin since the
translation back from the U+f0XX range to the original value already
works transparently for any character in the byte range.  We just have
to convert the chars <= 31 to the U+f0XX range just like the other
disallowed chars.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

