I've been struggling to be able to read .zw, .yg, .yg5 files, among other formats, which are files that are downloaded by us from the biometric industry reader ANVIS the W1 model .
Within these files should be users 'and users' marks , but when I try to open them with any text editor this contains characters that are not recognized, in sublimetext for example they only show me just numbers.
What shows me sublime: YG file
a501 2500 0023 0000 0003 40ff ffff ffff
ffff 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0001 fc00 0040 0000 0003 44ff ffff
ffff ffff 4d61 6d61 6e69 2053 6f74 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0001 fc00 0040 0000 0003 4667
ce02 ffff ffff 5a61 7261 7465 2041 6cc3
a100 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0001 fc00 00c0 0000 0003
48ff ffff ffff ffff 50c3 a972 657a 2052
6f64 7200 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0001 fc00 0040 0000
0003 4aff ffff ffff ffff 476f 6d65 7a20
4265 6c74 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0001 fc00 0040
0000 0003 4cff ffff ffff ffff 4c65 6f6e
2041 6775 6972 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0001 fc00
0040 0000 0003 4eff ffff ffff ffff 436f
726f 2056 696c 6c63 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0001
fc00 0040 0000 0003 52ff ffff ffff ffff
5175 696c 6c61 2056 6172 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
... y mas todavia..
I've created a bit of code to decode these but I can not get it to work.
This is a picture of what I got from the BAK.ZW file.
In others there is more luck and at least something is understood. File YG
And so with the rest. I leave the test files here test files
And the code with which I am trying to make these files understandable:
using System;
using System.IO;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string[] lines = System.IO.File.ReadAllLines(@"c:\archivos\YG");
foreach (string line in lines)
{
Console.WriteLine("\t" + ToUnicode(line, 20127));
}
Console.WriteLine("Press any key to exit.");
System.Console.ReadKey();
}
public static string ToUnicode(string value, int codePage)
{
Encoding windows = Encoding.Default;
Encoding unicode = Encoding.Unicode;
Encoding sp = Encoding.GetEncoding(codePage);
if (sp != null && !String.IsNullOrEmpty(value))
{
byte[] wbytes = windows.GetBytes(value);
if (windows.CodePage != sp.CodePage)
{
byte[] ubytes = Encoding.Convert(sp, unicode, wbytes);
return unicode.GetString(ubytes);
}
else
{
byte[] ubytes = Encoding.Convert(windows, unicode, wbytes);
return unicode.GetString(ubytes);
}
}
else
{
return value;
}
}
}
}
I really do not understand what I am doing, but I hope that someone from Stackoverflow has stumbled upon this problem and has already requested it. I hope someone can help me.