From owner-freebsd-bugs Mon Jan 4 05:29:07 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA13197 for freebsd-bugs-outgoing; Mon, 4 Jan 1999 05:29:07 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from gw1.pl.cp (redion.nttmcl.com [216.69.69.40]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA13192 for ; Mon, 4 Jan 1999 05:29:04 -0800 (PST) (envelope-from astralblue@usa.net) Received: from localhost (gene@localhost) by gw1.pl.cp (8.9.1/8.9.1) with SMTP id FAA13821; Mon, 4 Jan 1999 05:27:50 -0800 (PST) (envelope-from astralblue@usa.net) X-Authentication-Warning: gw1.pl.cp: gene owned process doing -bs Date: Mon, 4 Jan 1999 05:27:49 -0800 (PST) From: "Eugene M. Kim" X-Sender: gene@gw1.pl.cp To: Thomas David Rivers cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/3246: mtree -c should escape whitespace and special characters In-Reply-To: <199901041256.HAA02103@lakes.dignus.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At first I also considered the C-style sequences, but I decided for the URL-style one because the resulting code was simpler (and probably faster). The human readability might be worse, but mtree files are usually read and parsed only by mtree. And the URL-style sequence is already a standard, as defined in RFC2396. On Mon, 4 Jan 1999, Thomas David Rivers wrote: | Eugene... | | I really like the improvements you made to mtree, but I was wondering, | why did you pick "%nn" as the escape? Wouldn't it have been more "C-like" | to use "\nnn","\xnn" and "\c"? I would guess that the backslash is a little | more unlikely as an existing file character (unless we consider Windows)... | | It seems a shame to invent yet-another character escaping mechanism. | | In this case, to note a space, the simple: | | I\ have\ spaces | | would work, and would appear a little more obvious to the reader (those | really are spaces.) | | Similarly, | | I\x20\have\x21special\x22chars | | would work for putting in special characters... | | | Just a thought... | | - Dave Rivers - | Eugene M. Kim "Is your music unpopular? Make it popular; make music which people like, or make people who like your music." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message