delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/09/09:44:46

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019