From: Johannes Sixt Date: Mon, 18 May 2009 12:04:08 GMT Subject: Re: [PATCH] Extend sample pre-commit hook to check for non ascii filenames Message-ID: <4A114EB8.60609@viscovery.net> In-Reply-To: <20090518115002.GA3374@heiko-voigts-macbook.local> Heiko Voigt schrieb: > Are there any problems with '\0' and tr other than swallowing of it. I can't tell. But the commits ae90e16..aab0abf are interesting to study in w.r.t. portability. > In > case not I would just change > > tr "\0" "\n" > to > tr -d '\0' In which case I'd suggest that you call tr only once, in isascii(): tr -d '[ -~]\0' -- Hannes