[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] pdfmom: needs C locale?
From: |
Deri James |
Subject: |
Re: [groff] pdfmom: needs C locale? |
Date: |
Mon, 12 Mar 2018 13:02:25 +0000 |
User-agent: |
KMail/4.14.10 (Linux/4.4.114-desktop-1.mga5; KDE/4.14.35; x86_64; ; ) |
On Sat 10 Mar 2018 12:29:54 Ralph Corderoy wrote:
> I don't know how all those other commands did. :-)
> What's the output of
>
> dpkg-query -W grep
> grep --version
> od -tx1z <<<$'x\xa0\xa0y'
> LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y'
> LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y\nz'
> LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y'
> LC_ALL=en_GB.iso88591 grep y <<<$'x\xa0\xa0y'
> LC_ALL=C grep y <<<$'x\xa0\xa0y'
All the others are the same as yours. Here it is:-
=============================================================================
address@hidden ~]$ grep --version
grep (GNU grep) 2.20
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see
<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
address@hidden ~]$ od -tx1z <<<$'x\xa0\xa0y'
0000000 78 a0 a0 79 0a >x..y.<
0000005
address@hidden ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y'
address@hidden ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y\nz'
z
address@hidden ~]$ LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y'
x��y
address@hidden ~]$ LC_ALL=en_GB.iso88591 grep y <<<$'x\xa0\xa0y'
x��y
address@hidden ~]$ LC_ALL=C grep y <<<$'x\xa0\xa0y'
x��y
address@hidden ~]$ urpmq -i grep
$MIRRORLIST: media/core/updates/media_info/20180228-135247-info.xml.lzma
Name : grep
Version : 2.20
Release : 4.1.mga5
Group : Text tools
Size : 706453 Architecture: x86_64
Source RPM : grep-2.20-4.1.mga5.src.rpm
URL : http://www.gnu.org/software/grep/grep.html
Summary : The GNU versions of grep pattern matching utilities
Description :
The GNU versions of commonly used grep utilities. Grep searches one or
more input files for lines which contain a match to a specified pattern
and then prints the matching lines. GNU's grep utilities include grep,
egrep and fgrep.
You should install grep on your system, because it is a very useful utility
for searching through text files, for system administration tasks, etc.
===========================================================================
I have now run the same commands in VirtualBox on a more recent version of
Mageia:-
===========================================================================
address@hidden ~]$ grep --version
grep (GNU grep) 3.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see
<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
address@hidden ~]$ od -tx1z <<<$'x\xa0\xa0y'
0000000 78 a0 a0 79 0a >x..y.<
0000005
address@hidden ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y'
address@hidden ~]$ LC_ALL=en_GB.utf8 grep z <<<$'x\xa0\xa0y\nz'
z
address@hidden ~]$ LC_ALL=en_GB.utf8 grep y <<<$'x\xa0\xa0y'
Binary file (standard input) matches
address@hidden ~]$ LC_ALL=en_GB.iso88591 grep y <<<$'x\xa0\xa0y'
x��y
address@hidden ~]$ LC_ALL=C grep y <<<$'x\xa0\xa0y'
x��y
address@hidden ~]$
address@hidden ~]$ urpmq -i grep
Name : grep
Version : 3.0
Release : 1.mga6
Group : Text tools
Size : 790453 Architecture: x86_64
Source RPM : grep-3.0-1.mga6.src.rpm
URL : http://www.gnu.org/software/grep/grep.html
Summary : The GNU versions of the grep pattern matching utilities
Description :
The GNU versions of the commonly used grep utilities. Grep searches one or
more input files for lines which contain a match to a specified pattern
and then prints the matching lines. GNU's grep utilities include grep,
egrep and fgrep.
You should install grep on your system, because it is a very useful utility
for searching through text files, for system administration tasks, etc.
===========================================================================
Now I can see the binary file message, so between versions 2.20 and 3.0 it
appears the behaviour changed, or a difference in the environment of my user
under VirtualBox. Peter has committed the LC_ALL=C changes so there should not
be a problem with either version.
Thanks for your help.
Cheers
Deri