<![CDATA[Multiwfn forum / grep shows "Binary file matches"]]> - //www.umsyar.com/wfnbbs/viewtopic.php?id=616 Sat, 05 Feb 2022 18:59:24 +0000 FluxBB <![CDATA[Re: grep shows "Binary file matches"]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2217#p2217 Dear Tian Lu,

Thank you so much!

Best regards,
Igor

]]>
Sat, 05 Feb 2022 18:59:24 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2217#p2217
<![CDATA[Re: grep shows "Binary file matches"]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2216#p2216 Dear Igor

I have updated Multiwfn package, now all files are in UTF-8.

Best regards,

Tian

]]>
Sat, 05 Feb 2022 14:17:03 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2216#p2216
<![CDATA[Re: grep shows "Binary file matches"]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2215#p2215 Dear Tian Lu,

I see that problem both in Ubuntu in WSL and in Fedora 34 with the source code package of MultiWFN 3.8(dev) from 31 January 2022.
I found that these files have specific charset:

$ file -i * | grep text/plain | grep iso
basin.f90:              text/plain; charset=iso-8859-1
excittrans.f90:         text/plain; charset=iso-8859-1
fuzzy.f90:              text/plain; charset=iso-8859-1
hyper_polar.f90:        text/plain; charset=iso-8859-1
otherfunc3.f90:         text/plain; charset=iso-8859-1
population.f90:         text/plain; charset=iso-8859-1
sub.f90:                text/plain; charset=iso-8859-1
topology.f90:           text/plain; charset=iso-8859-1
util.f90:               text/plain; charset=iso-8859-1

But this charset is wrong: the source code has other specific encodings. For example, util.f90 has GBK encoding.

I have attached a patch that changes encodings in problem files to universal UTF-8 charset.

0001-Use-UTF-8-charset.patch.txt

You could apply that using `patch < 0001-Use-UTF-8-charset.patch.txt` in the root directory of MultiWFN.

Best regards,
Igor

]]>
Sat, 05 Feb 2022 05:21:23 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2215#p2215
<![CDATA[Re: grep shows "Binary file matches"]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2213#p2213 Dear Igor,

I don't have this problem, at least under CentOS 7 for files in source code package of Multiwfn 3.8(dev). These files are plain text files and should not be treated as binary files. I don't know why their status has become binary file on your computer.

Best regards,
Tian

]]>
Fri, 04 Feb 2022 23:20:07 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2213#p2213
<![CDATA[Re: grep shows "Binary file matches"]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2212#p2212 Dear Tian Lu,

One of example is

$ grep "overlap" util.f90 -i
! *** Overlap ***
Binary file util.f90 matches

The fastest way to detect binary files is to run the following command:

$ grep "." * | grep "Binary file"

and it produces (slightly cleaned):

Binary file basin.f90 matches
Binary file excittrans.f90 matches
Binary file fuzzy.f90 matches
Binary file hyper_polar.f90 matches
Binary file otherfunc3.f90 matches
Binary file population.f90 matches
Binary file sub.f90 matches
Binary file topology.f90 matches
Binary file util.f90 matches

Best regards,
Igor

]]>
Fri, 04 Feb 2022 22:30:05 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2212#p2212
<![CDATA[Re: grep shows "Binary file matches"]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2211#p2211 Dear Igor,

I don't find the problem of grep you mentioned. For example, in the source code folder, if I run "grep cellmaxxyz *.f90", then the following information will be shown on screen.

PBC.f90:subroutine cellmaxxyz(xmax,ymax,zmax)
plot.f90:    call cellmaxxyz(xmax,ymax,zmax)

Copying dislin_d-11.0.a to noGUI directory is not harmful.

Best regards,

Tian

]]>
Fri, 04 Feb 2022 15:43:57 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2211#p2211
<![CDATA[grep shows "Binary file matches"]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=2210#p2210 Dear Tian Lu,

I'm trying to implement some additional features for testing my own theory to Multiwfn.

Sometimes, I use grep for finding descriptions of routines. Unfortunately, if I forget to add -a flag to the grep command, sometimes I see:

Binary file sub.f90 matches
Binary file topology.f90 matches
Binary file util.f90 matches

It seems to me that the problem is with some specific characters that are not presented in the UTF-8 charset.

Could you please fix the encoding?

Additionally, I noticed that noGUI.sh copies dislin_d-11.0.a to noGUI directory and then it is not used.

Best regards,
Igor

]]>
Fri, 04 Feb 2022 09:49:11 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=2210#p2210