convert charset=binary, grep is not working, linux

I have this situation when I use
cat .rsrc/1033/version.txt
FILEVERSION    8,12,0,2
PRODUCTVERSION 8,12,0,2
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS VOS_UNKNOWN | VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0
{
BLOCK "StringFileInfo"
{
BLOCK "040904e4"
{
VALUE "Comments", "This installation was built with Inno Setup."
VALUE "CompanyName", "Skype Technologies S.A."
VALUE "FileDescription", "Skype Setup"
VALUE "FileVersion", "8.12.0.2"
VALUE "LegalCopyright", "(c) 2017 Skype and/or Microsoft"
VALUE "ProductName", "Skype"
VALUE "ProductVersion", "8.12"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1252
}
}
When I try to grep line with FileVersion info it will not work:
grep FileVersion .rsrc/1033/version.txt
When I open this file in vi editor:
Turns out I can check file type:
file -bi version.txt
This will show me some kind of binary data:
application/octet-stream; charset=binary
Solution is to use:
iconv -f unicode -t utf-8 version.txt | grep FileVersion

No comments: