Hello trid users,
I sometimes change the output device or update my display driver. After this
often an icon chaos can be found on the Windows desktop as if a bomb had
struck. To overcome this problem i now use a software called DesktopOK.
This can save and restore the positions of the Windows Desktop Icons. This
information is saved in files with suffix DOK.
When running TrID command on such ESP examples these samples are described
with highest rate in general correct as "Text - UTF-16 (LE) encoded" by
txt-utf-16-le.trid.xml. Because the test also starts with bye order mark
(BOM) the samples are described with low rate wrong as "MP3 audio" by
audio-mp3.trid.xml (See appended output/trid-v-old.txt).
For comparison reason i also run file command on such samples. Here these
are described in general correct as "Unicode text" with "UTF-16",
"little-endian" and "CRLF line terminators" (See appended
output/file-5.43.txt). Here generic mime type text/plain is used (See
appended output/file-i-5.43.txt)
For comparison reason i also run the file format identification utility
DROID ( See
https://sourceforge.net/projects/droid/). This does not
described these samples.
Unfortunately this suffix is also used for other file types. So i run
tridscan on examples to create dok-desktopok.trid.xml. Because DOK samples
are just text files i can use generic mime type text/plain. But because it
use structure of INI text files the samples can be edited by most text
editors, especially some that provide functionality like syntax high
lighting. So i choose a user defined one. That is expressed by line like:
<Mime>text/x-ini</Mime>
On Website of DesktopOK (
www.softwareok.com) you find a page about save
Desktop Layout in *.dok file. So i use this page as reference. That is
expressed by line like:
<RefURL>
https://www.softwareok.eu/?page=Windows/Tip/DesktopOK/7 </RefURL>
Unfortunately this company is also in-transparent about used file
format. They did not say the primitive fact that DOK samples are just INI
text files.
So i looked in generated definition and look what has changed and began to
interpret the found patterns. The DOC files are apparently text files with
lines like:
[DesktopOK-Icon-Layout]
Explorer=846,786
Microsoft Edge=34,100
Systeminformationen=614,100
Microsoft Store=730,296
System=730,884
When i changed the icons on the desktop or have no icons on desktop then
common part in all DOK samples are the first 2 lines, which look like:
[DesktopOK-Icon-Layout]
So the fist line contains key word DesktopOK-Icon-Layout in brackets and the
second line is empty. The lines are terminated with carriage return lined
feed (CRLF) and are stored as UTF 16 little endian with BOM marker. So this
facts are expressed by first XML construct. This now becomes:
<Bytes>FFFE5B004400650073006B0074006F0070004F004B002D00490063006F006E002D004C00610079006F00750074005D000D000A000D000A00</Bytes>
<ASCII> . . [ . D . e . s . k . t . o . p . O . K . - . I . c . o . n . - . L . a . y . o . u . t . ]</ASCII>
<Pos>0</Pos>
On third line a word like Explorer or System occur. Because this words are
ASCII like but stored as UTF-16 then every odd byte contains a nil
byte. That was expressed by XML constructs like:
<Pattern>
<Bytes>00</Bytes>
<Pos>57</Pos>
</Pattern>
<Pattern>
<Bytes>00</Bytes>
<Pos>59</Pos>
</Pattern>
...
<Pattern>
<Bytes>00</Bytes>
<Pos>2047</Pos>
</Pattern>
If the saved desktop layout contains less icons the last constructs
vanish. Also when using strange non ASCII like icons name like Chinese the
nil bytes will vanish there. So the above XML constructs vanish.
In my first efforts in global strings sections i get lines like:
<String>E'X'P'L'O'R'E'R</String>
<String>S'Y'S'T'E'M</String>
These are triggered by stored icon names as UTF-16. When i reduced the
number of icons on the desktop or have no icons on desktop then these
vanish. Only for first line with section name a line survived. That is
expressed by line like:
<String>D'E'S'K'T'O'P'O'K'-'I'C'O'N'-'L'A'Y'O'U'T</String>
With the trid definition now my DOK examples are recognized and described
(see appended output/trid-v-new.txt). TrID definition and output are stored
in archive dok_desktopok.zip. I hope that my XML file can be used in future
version of triddefs.
With best wishes
Jörg Jenderek