Subject: Re: [PATCH] Extend sample pre-commit hook to check for non ascii filenames

From: Johannes Sixt <[email-masked]>
Date: Mon, 18 May 2009 14:04:08 +0200

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