[File] File] [PATCH] of Magdir/archive for newest Corel Drawing + newer DESIGNER *.des + Symbol Library *.csl

Jörg Jenderek joerg.jen.der.ek at gmx.net
Sat Jun 6 21:55:06 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

some days ago i send patches for older RIFF based Corel Drawings.
Now i also run file command version 5.38 on newer zip based Corel
files. With -m Magdir/archive options i get an output like:

cdraw2020-14.des:       Corel
cdraw2020-15.des:       Corel
cdraw2020-16.des:       Corel
cdraw2020-17.des:       Corel
cdraw2020-19.des:       Corel
cdraw2020-20.des:       Corel
cdraw2020-21.des:       Corel
cdraw2020-22.cdr:       Corel Draw drawing, version 17-21
cdraw2020-22.cdrt:      Corel Draw template, version 17-21
cdraw2020-22.pat:       Corel
cdraw2020-csl-06.csl:   Corel
cdraw2020-csl-07.csl:   Corel
cdraw2020-csl-08.csl:   Corel
cdraw2020-csl-16.3.csl: Corel
cdraw2020-csl-17.csl:   Corel
cdraw2020-csl-18.csl:   Corel
cdraw2020-csl-19.csl:   Corel
cdraw2020-csl-20.csl:   Corel
cdraw2020-csl-21.csl:   Corel
cdraw2020-csl-22.csl:   Corel

All such inspected Corel samples are zip containers, where first
archive member is a file mimetype which contains the corresponding
mime type. This starts for inspected Corel samples with
"application/x-vnd.corel". So all inspected Corel examples are
described by Magdir/archive starting with lines
 0	string		PK\003\004
 >26	string		\x8\0\0\0mimetypeapplication/
 >>50	string	x-vnd.corel.	 Corel

The Corel Drawing (*.cdr) and templates (*.cdt *.cdrt) are recognized
and described by lines like
 >>>62	string	zcf.draw.document+zip	Draw drawing, version 17-21
 !:mime	application/x-vnd.corel.zcf.draw.document+zip
 !:ext	cdr
 >>>62	string	zcf.draw.template+zip	Draw template, version 17-21
 !:mime	application/x-vnd.corel.zcf.draw.template+zip
 !:ext	cdt/cdrt
The newest Corel Draw software ( Program version 2020) can generate
Drawings and templates with version 22 (See examples cdraw2020-22.cdr
and cdraw2020-22.cdrt). This version use the same basic file format
as in version 21 generated by Corel Draw software from 2019.
So i change lines in Magdir/archive in Corel Draw section. These
lines now becomes like:
 >>>62	string	zcf.draw.document+zip	Draw drawing, version 17-22
 >>>62	string	zcf.draw.template+zip	Draw template, version 17-22

For newer Corel DESIGNER (*.des), Corel Symbol Library (*.csl) and
Corel patterns (*.pat) i add more lines in Magdir/archive afterwards.

Most information can be found on Corel Designer page on Wikipedia. So
i add a comment line:
 # URL:		https://en.wikipedia.org/wiki/Corel_Designer
Some information about such Corel files is found on file formats
archive team website. That is now expressed by comment line like:
 # Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer
The sub class description are generated now by additional lines:
 >>>62 string designer.document+zip DESIGNER graphics,
	version 14-16
 !:mime	application/x-vnd.corel.designer.document+zip
 !:ext	des
 >>>62 string zcf.designer.document+zip DESIGNER graphics,
	version 17-21
 !:mime	application/x-vnd.corel.zcf.designer.document+zip
 !:ext	des
Surprisingly the newest CorelDraw software 2020 only generates DES
files with version 21 but no version 22 variant.

Some few hints about Corel Symbol Library (*.csl) is found on corel
product page. So i add this web page as comment line with URL like
 # URL:	http://product.corel.com/help/CorelDRAW/540223850/Main/EN/
 #	Documentation/CorelDRAW-Corel-Symbol-Library-CSL.html
Such CSL Libraries are now described by additional lines like:
 >>>62	string	symbol.library+zip	Symbol Library,
	version 6-16.3
 !:mime	application/x-vnd.corel.symbol.library+zip
 !:ext	csl
 >>>62	string	zcf.symbol.library+zip Symbol Library,
	version 17-22
 !:mime	application/x-vnd.corel.zcf.symbol.library+zip
 !:ext	csl
Surprisingly here exist an intermediate version 16.3 but apparently
a version 16 seems to be missing.

Some few hints about Corel pattern (*.pat) is found on corel
product page. So i add this web page as comment line with URL like:
 # URL:	http://product.corel.com/help/CorelDRAW/540240626/Main/EN/
 #	Doc/CorelDRAW-Other-file-formats.html
Such pattern files are now described by additional lines like
 >>>62	string	zcf.pattern+zip		Draw pattern, version 22
 !:mime	application/x-vnd.corel.zcf.pattern+zip
 !:ext	pat
Surprisingly for ZIP based pattern i only found version 22 variant.

After applying the above mentioned modifications by patch
file-5.38-archive-corel.diff then i get a more precise output like:

cdraw2020-14.des:       Corel DESIGNER graphics, version 14-16
cdraw2020-15.des:       Corel DESIGNER graphics, version 14-16
cdraw2020-16.des:       Corel DESIGNER graphics, version 14-16
cdraw2020-17.des:       Corel DESIGNER graphics, version 17-21
cdraw2020-19.des:       Corel DESIGNER graphics, version 17-21
cdraw2020-20.des:       Corel DESIGNER graphics, version 17-21
cdraw2020-21.des:       Corel DESIGNER graphics, version 17-21
cdraw2020-22.cdr:       Corel Draw drawing, version 17-22
cdraw2020-22.cdrt:      Corel Draw template, version 17-22
cdraw2020-22.pat:       Corel Draw pattern, version 22
cdraw2020-csl-06.csl:   Corel Symbol Library, version 6-16.3
cdraw2020-csl-07.csl:   Corel Symbol Library, version 6-16.3
cdraw2020-csl-08.csl:   Corel Symbol Library, version 6-16.3
cdraw2020-csl-16.3.csl: Corel Symbol Library, version 6-16.3
cdraw2020-csl-17.csl:   Corel Symbol Library, version 17-22
cdraw2020-csl-18.csl:   Corel Symbol Library, version 17-22
cdraw2020-csl-19.csl:   Corel Symbol Library, version 17-22
cdraw2020-csl-20.csl:   Corel Symbol Library, version 17-22
cdraw2020-csl-21.csl:   Corel Symbol Library, version 17-22
cdraw2020-csl-22.csl:   Corel Symbol Library, version 17-22

I hope my diff file can be applied in future version of
file utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXtwQlwAKCRCv8rHJQhrU
1vMzAJ0ezd34pyYnsWUl0MdSvZWHlXpb1ACgr5HEfrCxynrmE6Mgk5jjbbhaY0g=
=FQry
-----END PGP SIGNATURE-----
-------------- next part --------------
--- file-5.38/magic/Magdir/archive.old	2019-11-15 21:03:14 +0000
+++ file-5.38/magic/Magdir/archive	2020-06-06 21:35:14 +0000
@@ -1208,8 +1208,29 @@
 !:ext	cdrt
->>>62	string	zcf.draw.document+zip	Draw drawing, version 17-21
+>>>62	string	zcf.draw.document+zip	Draw drawing, version 17-22
 !:mime	application/x-vnd.corel.zcf.draw.document+zip
 !:ext	cdr
->>>62	string	zcf.draw.template+zip	Draw template, version 17-21
+>>>62	string	zcf.draw.template+zip	Draw template, version 17-22
 !:mime	application/x-vnd.corel.zcf.draw.template+zip
 !:ext	cdt/cdrt
+# URL:	http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html
+>>>62	string	zcf.pattern+zip		Draw pattern, version 22
+!:mime	application/x-vnd.corel.zcf.pattern+zip
+!:ext	pat
+# URL:		https://en.wikipedia.org/wiki/Corel_Designer
+# Reference:	http://fileformats.archiveteam.org/wiki/Corel_Designer
+# Note:		called by TrID "Corel DESIGN graphics"
+>>>62	string	designer.document+zip		DESIGNER graphics, version 14-16
+!:mime	application/x-vnd.corel.designer.document+zip
+!:ext	des
+>>>62	string	zcf.designer.document+zip	DESIGNER graphics, version 17-21
+!:mime	application/x-vnd.corel.zcf.designer.document+zip
+!:ext	des
+# URL:	http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/
+#	CorelDRAW-Corel-Symbol-Library-CSL.html
+>>>62	string	symbol.library+zip		Symbol Library, version 6-16.3
+!:mime	application/x-vnd.corel.symbol.library+zip
+!:ext	csl
+>>>62	string	zcf.symbol.library+zip		Symbol Library, version 17-22
+!:mime	application/x-vnd.corel.zcf.symbol.library+zip
+!:ext	csl
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.38-archive-corel.diff.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20200606/0379af0e/attachment.obj>


More information about the File mailing list