groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] address@hidden: mom: PDF Author, pdfmom: needs C locale?]


From: Deri James
Subject: Re: [groff] address@hidden: mom: PDF Author, pdfmom: needs C locale?]
Date: Fri, 09 Mar 2018 20:46:17 +0000
User-agent: KMail/4.14.10 (Linux/4.4.114-desktop-1.mga5; KDE/4.14.35; x86_64; ; )

On Fri 09 Mar 2018 16:09:35 Ralph Corderoy wrote:
> That seems unlikely.  grep thinks files are binary if they contain ASCII
> NUL, or have a byte sequence that's invalid for the locale, and it only
> emits that `Binary file ... matches' if such a line matches the regexp.
> 
> Does your grep behave like this?  I used a UTF-8 terminal.
> 
>     $ od -tx1z <<<$'x\xa0\xa0y'
>     0000000 78 a0 a0 79 0a                                   >x..y.<
>     0000005
>     $ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y'
>     $ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y\nz'
>     z
>     $ LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y'
>     Binary file (standard input) matches
>     $ LC_ALL=en_GB.iso88591 grep y <<<$'x\xa0\xa0y'
>     x��y
>     $ LC_ALL=C grep y <<<$'x\xa0\xa0y'
>     x��y
>     $
> 
> -- 
> Cheers, Ralph.

Your example which produces the "Binary file" message, produces this:-

address@hidden build (master)]$ LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y'
x��y

So I am not seeing the message. I looked for any aliases and found:-

alias grep='grep --color'

So I unaliased it and ran again, with same result, except the "y" was not 
coloured.

I don't know why I don't see the message!

Cheers 

Deri




reply via email to

[Prev in Thread] Current Thread [Next in Thread]