wordprocessors 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. #------------------------------------------------------------------------------
  2. # $File: wordprocessors,v 1.34 2023/01/24 20:13:40 christos Exp $
  3. # wordprocessors: file(1) magic fo word processors.
  4. #
  5. ####### PWP file format used on Smith Corona Personal Word Processors:
  6. 2 string \040\040\040\040\040\040\040\040\040\040\040ML4D\040'92 Smith Corona PWP
  7. >24 byte 2 \b, single spaced
  8. >24 byte 3 \b, 1.5 spaced
  9. >24 byte 4 \b, double spaced
  10. >25 byte 0x42 \b, letter
  11. >25 byte 0x54 \b, legal
  12. >26 byte 0x46 \b, A4
  13. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
  14. # reference: http://mark0.net/download/triddefs_xml.7z
  15. # /defs/w/wps-works-dos.trid.xml
  16. # From: Joerg Jenderek
  17. # Note: older non OLE 2 Compound based versions
  18. 0 ubeshort =0x01FE
  19. >112 ubeshort =0x0100 Microsoft Works 1-3 (DOS) or 2 (Windows) document
  20. # title like THE GREAT KHAN GAME
  21. >>0x100 string x %s
  22. !:mime application/vnd-ms-works
  23. #!:mime application/x-msworks
  24. # https://www.macdisk.com/macsigen.php
  25. !:apple ????AWWP
  26. !:ext wps
  27. # Corel/WordPerfect
  28. # URL: https://en.wikipedia.org/wiki/WordPerfect
  29. # Reference: https://github.com/OneWingedShark/WordPerfect/blob/master/doc/SDK_Help/FileFormats/WPFF_DocumentStructure.htm
  30. # http://mark0.net/download/triddefs_xml.7z/defs/w/wp-generic.trid.xml
  31. 0 string \xffWPC
  32. # WordPerfect
  33. >8 byte 1
  34. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/w/wpm-macro.trid.xml
  35. # Note: there exist other macro variants
  36. >>9 byte 1 WordPerfect macro
  37. #!:mime application/octet-stream
  38. !:mime application/x-wordperfect-wpm
  39. # like: ALTD.WPM ENDFOOT.WPM FOOTEND.WPM LABELS.WPM REVEALTX.WPM
  40. !:ext wpm
  41. # Note: used in WordPerfect 5.1; there exist other FIL variants
  42. >>9 byte 2 WordPerfect help file
  43. #!:mime application/octet-stream
  44. !:mime application/x-wordperfect-help
  45. # like: WPHELP.FIL
  46. !:ext fil
  47. # pointer to document area like: 10h
  48. >>>4 ulelong !0x10 \b, at %#x document area
  49. >>9 byte 3 WordPerfect keyboard file
  50. #!:mime application/octet-stream
  51. !:mime application/x-wordperfect-keyboard
  52. !:ext wpk
  53. # no document area, so point to end of file; so this is file size like: 23381 2978 32835 3355 3775 919
  54. >>>4 ulelong x \b, %u bytes
  55. >>9 byte 4 WordPerfect VAX keyboard definition
  56. #!:mime application/octet-stream
  57. !:mime application/x-wordperfect-keyboard
  58. #!:ext foo
  59. # URL: http://fileformats.archiveteam.org/wiki/WordPerfect
  60. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/w/wpd-doc-gen.trid.xml
  61. >>9 byte 10 WordPerfect document
  62. # https://www.iana.org/assignments/media-types/application/vnd.wordperfect
  63. !:mime application/vnd.wordperfect
  64. #!:apple ????WPC2
  65. # TODO: distinguish different suffix
  66. !:ext wpd/wpt/wkb/icr/tut/sty/tst/crs
  67. >>9 byte 11 WordPerfect dictionary
  68. >>9 byte 12 WordPerfect thesaurus
  69. >>9 byte 13 WordPerfect block
  70. >>9 byte 14 WordPerfect rectangular block
  71. >>9 byte 15 WordPerfect column block
  72. >>9 byte 16 WordPerfect printer data
  73. #!:mime application/octet-stream
  74. !:mime application/x-wordperfect-prs
  75. # like: STANDARD.PRS WORKBOOK.PRS
  76. !:ext prs
  77. # like: "Standard Printer" "Workbook Printer"
  78. >>>0x64 pstring/B >A "%s"
  79. #>>9 byte 18 WordPerfect Prefix information file
  80. # printer resource .ALL
  81. >>9 byte 19 WordPerfect printer data
  82. #!:mime application/octet-stream
  83. !:mime application/x-wordperfect-all
  84. !:ext all
  85. # display Resource
  86. >>9 byte 20 WordPerfect driver resource data
  87. #!:mime application/octet-stream
  88. !:mime application/x-wordperfect-drs
  89. # like: WPSMALL.DRS
  90. !:ext drs
  91. # pointer to index area with string "smalldrs" like: 46h
  92. >>>4 uleshort !0x46 \b, at %#x index area
  93. >>9 byte 21 WordPerfect Overlay file
  94. #!:mime application/octet-stream
  95. !:mime application/x-wordperfect-fil
  96. # like: WP.FIL
  97. !:ext fil
  98. # URL: http://fileformats.archiveteam.org/wiki/WordPerfect_Graphics
  99. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-wpg.trid.xml
  100. # Note: called "WordPerfect Graphics bitmap" by TrID and
  101. # "WordPerfect Graphics Metafile" by DROID via x-fmt/395 fmt/1042
  102. # "WPG (Word Perfect Graphics)" by ImageMagick `identify -verbose BUTTRFLY.WPG`
  103. >>9 byte 22 WordPerfect graphic image
  104. # TODO: skip DROID x-fmt-395-signature-id-132.wpg by check for existing document area
  105. #>>>4 ulelong >15 WordPerfect_graphic_OK
  106. #!:mime application/octet-stream
  107. # http://extension.nirsoft.net/wpg
  108. !:mime image/x-wordperfect-graphics
  109. # https://reposcope.com/mimetype/application/x-wpg
  110. #!:mime application/x-wpg
  111. # like: BUTTRFLY.WPG STAR-5.WPG input.wpg WORDPFCT.WPG
  112. !:ext wpg
  113. # pointer to document area like: 10h 1Ah
  114. >>>4 ulelong !0x1A \b, at %#x document area
  115. >>9 byte 23 WordPerfect hyphenation code
  116. >>9 byte 24 WordPerfect hyphenation data
  117. >>9 byte 25 WordPerfect macro resource data
  118. #!:mime application/octet-stream
  119. !:mime application/x-wordperfect-mrs
  120. # like: WP.MRS
  121. !:ext mrs
  122. >>9 byte 27 WordPerfect hyphenation lex
  123. >>9 byte 29 WordPerfect wordlist
  124. >>9 byte 30 WordPerfect equation resource data
  125. #!:mime application/octet-stream
  126. !:mime application/x-wordperfect-qrs
  127. # like: WQ.QRS wpDE.qrs wpen.qrs
  128. !:ext qrs
  129. # jump to document area with some marker and equation
  130. >>>(4.l) ubyte x
  131. # equation like: "Fraction: x OVER y"
  132. >>>>&1 string >A (...%-.19s...)
  133. # pointer to document area like: 17C4h
  134. >>>4 ulelong x \b, at %#x document area
  135. #>>9 byte 31 reserved
  136. #>>9 byte 32 WordPerfect VAX .SET
  137. >>9 byte 33 WordPerfect spell rules
  138. >>9 byte 34 WordPerfect dictionary rules
  139. #>>9 byte 35 reserved
  140. # video resource device driver
  141. # Note: filetype 26 for VRS and filetype 36 for WPD apparently is wrong
  142. >>9 byte 36 WordPerfect Video Resource
  143. #!:mime application/octet-stream
  144. !:mime application/x-wordperfect-vrs
  145. # like: STANDARD.VRS
  146. !:ext vrs
  147. # like: "IBM CGA (& compatibles)"
  148. >>>0x20 string >A "%.23s"
  149. >>9 byte 39 WordPerfect spell rules (Microlytics)
  150. #>>9 byte 40 reserved
  151. >>9 byte 41 WordPerfect Install options
  152. #!:mime application/octet-stream
  153. !:mime application/x-wordperfect-ins
  154. # like: WP51.INS
  155. !:ext ins
  156. # probably default directory name like: "C:\WP51\"
  157. >>>0x12 string >A "%.8s"
  158. # maybe mouse driver for WP5.1
  159. >>9 byte 42 WordPerfect Resource
  160. #!:mime application/octet-stream
  161. !:mime application/x-wordperfect-irs
  162. # like: STANDARD.IRS
  163. !:ext irs
  164. # like: "Mouse Driver (MOUSE.COM)"
  165. >>>0x28 string >A "%.24s"
  166. >>9 byte 43 WordPerfect settings file
  167. # maybe Macintosh WP2.0 document
  168. >>9 byte 44 WordPerfect 3.5 document
  169. !:mime application/vnd.wordperfect
  170. !:apple ????WPD3
  171. # like: WP3.wpd
  172. !:ext wpd
  173. >>9 byte 45 WordPerfect 4.2 document
  174. # External spell code module (WP5.1)
  175. #>>9 byte 46 WordPerfect external spell
  176. # external spell dictionary .LEX
  177. #>>9 byte 47 WordPerfect external spell dictionary
  178. # Macintosh SOFT graphics file (SOFT (Sequential Object Format)
  179. #>>9 byte 48 WordPerfect SOFT graphics
  180. #>>9 byte 49 reserved
  181. #>>9 byte 50 reserved
  182. # WPWin 5.1 Application Resource Library added for WPWin 5.1
  183. #>>9 byte 51 WordPerfect application resource library
  184. >>9 byte 69 WordPerfect dialog file
  185. # From: Joerg Jenderek
  186. # Note: found in sub directory WritingTools inside WordPerfect 2021 program directory
  187. >>9 byte 70 WordPerfect Writing Tools
  188. #!:mime application/octet-stream
  189. !:mime application/x-wordperfect-cbt
  190. # like: Wt13cbede.cbt Wt13cbeit.cbt Wt13cbefr.cbt WT21cbede.cbt Wt13cbeEN.CBD WT21cbeEN.CBD
  191. !:ext cbd/cbt
  192. >>9 byte 76 WordPerfect button bar
  193. >>9 default x
  194. >>>9 byte x Corel WordPerfect: Unknown filetype %d
  195. # Corel Shell
  196. >8 byte 2
  197. >>9 byte 1 Corel shell macro
  198. >>9 byte 10 Corel shell definition
  199. >>9 default x
  200. >>>9 byte x Corel Shell: Unknown filetype %d
  201. # Corel Notebook
  202. >8 byte 3
  203. >>9 byte 1 Corel Notebook macro
  204. >>9 byte 2 Corel Notebook help file
  205. >>9 byte 3 Corel Notebook keyboard file
  206. >>9 byte 10 Corel Notebook definition
  207. >>9 default x
  208. >>>9 byte x Corel Notebook: Unknown filetype %d
  209. # Corel Calculator
  210. >8 byte 4
  211. >>9 byte 2 Corel Calculator help file
  212. >>9 default x
  213. >>>9 byte x Corel Calculator: Unknown filetype %d
  214. # Corel File Manager
  215. >8 byte 5
  216. >>9 default x
  217. >>>9 byte x Corel File Manager: Unknown filetype %d
  218. # Corel Calendar
  219. >8 byte 6
  220. >>9 byte 2 Corel Calendar help file
  221. >>9 byte 10 Corel Calendar data file
  222. >>9 default x
  223. >>>9 byte x Corel Calendar: Unknown filetype %d
  224. # Corel Program Editor/Ed Editor
  225. >8 byte 7
  226. >>9 byte 1 Corel Editor macro
  227. >>9 byte 2 Corel Editor help file
  228. >>9 byte 3 Corel Editor keyboard file
  229. >>9 byte 25 Corel Editor macro resource file
  230. >>9 default x
  231. >>>9 byte x Corel Program Editor/Ed Editor: Unknown filetype %d
  232. # Corel Macro Editor
  233. >8 byte 8
  234. >>9 byte 1 Corel Macro editor macro
  235. >>9 byte 2 Corel Macro editor help file
  236. >>9 byte 3 Corel Macro editor keyboard file
  237. >>9 default x
  238. >>>9 byte x Corel Macro Editor: Unknown filetype %d
  239. # Corel Plan Perfect
  240. >8 byte 9
  241. >>9 default x
  242. >>>9 byte x Corel Plan Perfect: Unknown filetype %d
  243. # Corel DataPerfect
  244. >8 byte 10
  245. # CHECK: Don't these belong into product 9?
  246. >>9 byte 1 Corel PlanPerfect macro
  247. >>9 byte 2 Corel PlanPerfect help file
  248. >>9 byte 3 Corel PlanPerfect keyboard file
  249. >>9 byte 10 Corel PlanPerfect worksheet
  250. >>9 byte 15 Corel PlanPerfect printer definition
  251. >>9 byte 18 Corel PlanPerfect graphic definition
  252. >>9 byte 19 Corel PlanPerfect data
  253. >>9 byte 20 Corel PlanPerfect temporary printer
  254. >>9 byte 25 Corel PlanPerfect macro resource data
  255. >>9 default x
  256. >>>9 byte x Corel DataPerfect: Unknown filetype %d
  257. # Corel Mail
  258. >8 byte 11
  259. >>9 byte 2 Corel Mail help file
  260. >>9 byte 5 Corel Mail distribution list
  261. >>9 byte 10 Corel Mail out box
  262. >>9 byte 11 Corel Mail in box
  263. >>9 byte 20 Corel Mail users archived mailbox
  264. >>9 byte 21 Corel Mail archived message database
  265. >>9 byte 22 Corel Mail archived attachments
  266. >>9 default x
  267. >>>9 byte x Corel Mail: Unknown filetype %d
  268. # Corel Printer
  269. >8 byte 12
  270. >>9 byte 11 Corel Printer temporary file
  271. >>9 default x
  272. >>>9 byte x Corel Printer: Unknown filetype %d
  273. # Corel Scheduler
  274. >8 byte 13
  275. >>9 byte 2 Corel Scheduler help file
  276. >>9 byte 10 Corel Scheduler in file
  277. >>9 byte 11 Corel Scheduler out file
  278. >>9 default x
  279. >>>9 byte x Corel Scheduler: Unknown filetype %d
  280. # Corel WordPerfect Office
  281. >8 byte 14
  282. >>9 byte 10 Corel GroupWise settings file
  283. >>9 byte 17 Corel GroupWise directory services
  284. >>9 byte 43 Corel GroupWise settings file
  285. >>9 default x
  286. >>>9 byte x Corel WordPerfect Office: Unknown filetype %d
  287. # Corel DrawPerfect
  288. # URL: http://fileformats.archiveteam.org/wiki/Corel_Presentations
  289. # Update: Joerg Jenderek
  290. >8 byte 15
  291. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/shw-wp-2.trid.xml
  292. # Note: called "WordPerfect Presentations (v2)" by TrID and
  293. # "Corel Presentation" with version "7-8-9" by DROID via PUID fmt/877
  294. >>9 byte 10 WordPerfect Presentation
  295. #!:mime application/octet-stream
  296. #!:mime application/vnd.wordperfect
  297. !:mime application/x-drawperfect-shw
  298. # like: BENEFITS.SHW chartbar.shw chartbul.shw chartgal.shw chartorg.shw fig-demo.shw figurgal.shw mastrgal.shw scuba.shw tutorial.shw
  299. !:ext shw
  300. # pointer to document area like: 10h
  301. >>>4 ulelong !0x10 \b, at %#x document area
  302. # according to TrID this is nil
  303. >>>12 ulelong !0 \b, at 0xC %#x
  304. # search for embedded WP file like in tutorial.shw
  305. #>>>16 search/638/sb \xffWPC WPC_MAGIC_FOUND
  306. # GRR: indirect call leads to recursion! WHY?
  307. #>>>>&0 indirect x \b; contains
  308. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/shw-wp-3.trid.xml
  309. # Note: called "WordPerfect/Corel Presentations (v3)" by TrID and
  310. # "Corel Presentation" with version "3" by DROID via PUID fmt/878
  311. >>9 byte 15 Corel Presentation
  312. #!:mime application/octet-stream
  313. #!:mime application/vnd.wordperfect
  314. !:mime application/x-drawperfect-shw
  315. # like: FIG_ANIM.SHW presenta.shw
  316. !:ext shw
  317. # pointer to document area like: 1ah
  318. >>>4 ulelong !0x1a \b, at %#x document area
  319. # according to TrID this is nil
  320. >>>12 ulelong !0 \b, at 0xC %#x
  321. # reserved like: 3
  322. >>>16 ulelong !0x3 \b, at 0x10 %#x
  323. # file size, not including pad characters at EOF
  324. >>>0x14 ulelong x \b, %u bytes
  325. # search for embedded WP file like in foo
  326. #>>>24 search/638/sb \xffWPC WPC_MAGIC_FOUND
  327. # GRR: indirect call leads to recursion! WHY?
  328. #>>>>&0 indirect x \b; contains
  329. # embedded inside Compound Document variant handled by ./ole2compounddocs
  330. >>9 byte 16 Corel Presentation (embeded)
  331. #!:mime application/octet-stream
  332. #!:mime application/vnd.wordperfect
  333. !:mime application/x-corelpresentations
  334. # like: PerfectOffice_MAIN
  335. !:ext /
  336. # pointer to document area like: 1ah
  337. >>>4 ulelong !0x1a \b, at %#x document area
  338. >>>12 ulelong !0 \b, at 0xC %#x
  339. # reserved like: 3
  340. >>>16 ulelong !0x3 \b, at 0x10 %#x
  341. # file size, not including pad characters at EOF
  342. >>>0x14 ulelong x \b, %u bytes
  343. # search for embedded WP file
  344. #>>>24 search/638/sb \xffWPC WPC_MAGIC_FOUND
  345. # GRR: indirect call leads to recursion! WHY?
  346. #>>>>&0 indirect x \b; contains
  347. >>9 default x
  348. >>>9 byte x Corel DrawPerfect: Unknown filetype %d
  349. # Corel LetterPerfect
  350. >8 byte 16
  351. >>9 default x
  352. >>>9 byte x Corel LetterPerfect: Unknown filetype %d
  353. # Corel Terminal
  354. >8 byte 17
  355. >>9 byte 10 Corel Terminal resource data
  356. >>9 byte 11 Corel Terminal resource data
  357. >>9 byte 43 Corel Terminal resource data
  358. >>9 default x
  359. >>>9 byte x Corel Terminal: Unknown filetype %d
  360. # Corel loadable file
  361. >8 byte 18
  362. >>9 byte 10 Corel loadable file
  363. >>9 byte 11 Corel GUI loadable text
  364. >>9 byte 12 Corel graphics resource data
  365. >>9 byte 13 Corel printer settings file
  366. >>9 byte 14 Corel port definition file
  367. >>9 byte 15 Corel print queue parameters
  368. >>9 byte 16 Corel compressed file
  369. >>9 default x
  370. >>>9 byte x Corel loadable file: Unknown filetype %d
  371. >>15 byte 0 \b, optimized for Intel
  372. >>15 byte 1 \b, optimized for Non-Intel
  373. # Network service
  374. >8 byte 20
  375. >>9 byte 10 Corel Network service msg file
  376. >>9 byte 11 Corel Network service msg file
  377. >>9 byte 12 Corel Async gateway login msg
  378. >>9 byte 14 Corel GroupWise message file
  379. >>9 default x
  380. >>>9 byte x Corel Network service: Unknown filetype %d
  381. # GroupWise
  382. >8 byte 31
  383. >>9 byte 20 GroupWise admin domain database
  384. >>9 byte 21 GroupWise admin host database
  385. >>9 byte 23 GroupWise admin remote host database
  386. >>9 byte 24 GroupWise admin ADS deferment data file
  387. >>9 default x
  388. >>>9 byte x GroupWise: Unknown filetype %d
  389. # Corel Writing Tools WT*.*
  390. # From: Joerg Jenderek
  391. # URL: https://support.corel.com/hc/en-us/articles/215876258-Writing-Tools-Spell-Check-Dictionary-does-not-work-in-WordPerfect-X5
  392. # http://wordperfect.helpmax.net/en/editing-and-formatting-documents/using-the-writing-tools/working-with-user-word-lists/
  393. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/u/uwl-wp.trid.xml
  394. >8 byte 32
  395. >>9 byte 10 Corel Writing Tools User Word List
  396. #!:mime application/octet-stream
  397. !:mime application/x-wordperfect-wordlist
  398. # personal user word list UWL under user directory like: WTDE.UWL WTUS.UWL WT21DE.UWL WT21US.UWL WT13DE.UWL ...
  399. # and "template" SAV/HWL variant under program directory like: wt13en.hwl Wt13de.sav Wt13it.sav wt13ru.sav WT21us.sav Wtcz.sav ...
  400. !:ext uwl/hwl/sav
  401. # jump to document area with some marker and word list
  402. >>>(4.l) ubyte x
  403. # look for beginning of word list starting mostly with letter a as UTF-16 like: Wt13es.sav
  404. # but not found in russian wt13ru.sav
  405. >>>>&0 search/91/sb a\0
  406. # word list starting like: "acsesory\022accessory.\001\026acomodate\026accommodate4\001"
  407. >>>>>&0 lestring16 x (...%-.33s...)
  408. # pointer to document area like: 200h
  409. >>>4 ulelong !0x200 \b, at %#x document area
  410. # file size, not including pad characters at EOF
  411. >>>0x14 uleshort x \b, %u bytes
  412. # IntelliTAG
  413. >8 byte 33
  414. >>9 byte 10 IntelliTAG (SGML) compiled DTD
  415. >>9 default x
  416. >>>9 byte x IntelliTAG: Unknown filetype %d
  417. # Summary: Corel WordPerfect WritingTools advise part
  418. # From: Joerg Jenderek
  419. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/adv-wp.trid.xml
  420. >8 byte 34
  421. >>9 byte 11 Corel WordPerfect dictionary advise
  422. #!:mime application/octet-stream
  423. !:mime application/x-wordperfect-adv
  424. #!:mime application/vnd.wordperfect.adv
  425. # like: WT21de.adv Wt13de.adv Wt13es.adv Wt13fr.adv wt13us.adv
  426. !:ext adv
  427. # advise text part often start with tag like: 580A
  428. #>>>(16.s) ubequad x ADVISE PART %#llx
  429. # part of advise text like: "This is too informal for most writing."
  430. >>>(16.s+16) string x (...%-.33s...)
  431. # everything else
  432. >8 default x
  433. >>8 byte x Unknown Corel/Wordperfect product %d,
  434. >>>9 byte x file type %d
  435. >10 byte 0 \b, v5.
  436. # version of WP file; 2.1~WP 8.0
  437. # major version of WP file like: 1 2
  438. >10 byte !0 \b, v%d.
  439. # minor version of WP file like: 0 1
  440. >11 byte x \b%d
  441. # Hancom HWP (Hangul Word Processor)
  442. # Hangul Word Processor 3.0 through 97 used HWP 3.0 format.
  443. # URL: https://www.hancom.com/etc/hwpDownload.do
  444. 0 string HWP\ Document\ File Hancom HWP (Hangul Word Processor) file, version 3.0
  445. !:ext hwp
  446. # CosmicBook, from Benoit Rouits
  447. 0 string CSBK Ted Neslson's CosmicBook hypertext file
  448. 2 string EYWR AmigaWriter file
  449. # chi: file(1) magic for ChiWriter files
  450. 0 string \\1cw\ ChiWriter file
  451. >5 string >\0 version %s
  452. 0 string \\1cw ChiWriter file
  453. # Quark Express from https://www.garykessler.net/library/file_sigs.html
  454. 2 string IIXPR3 Intel Quark Express Document (English)
  455. 2 string IIXPRa Intel Quark Express Document (Korean)
  456. 2 string MMXPR3 Motorola Quark Express Document (English)
  457. !:mime application/x-quark-xpress-3
  458. 2 string MMXPRa Motorola Quark Express Document (Korean)
  459. # From: Joerg Jenderek
  460. # URL: http://fileformats.archiveteam.org/wiki/PageMaker
  461. # https://en.wikipedia.org/wiki/Adobe_PageMaker
  462. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p
  463. # pm4-pagemaker.trid.xml
  464. # pm5-pagemaker.trid.xml
  465. # Note: since version 6 in 1995 called Adobe PageMaker and
  466. # embedded in Compound Document handled by ./ole2compounddocs
  467. # mainly tested little endian variant
  468. 4 ubelong =0x0000FF99
  469. >0 use PageMaker
  470. # big endian variant
  471. 4 ubelong =0x000099FF
  472. >0 use \^PageMaker
  473. # display information of Aldus/Adobe PageMaker document/publication
  474. 0 name PageMaker
  475. >110 uleshort <0x0600 Aldus
  476. >110 uleshort >0x05FF Adobe
  477. >110 uleshort x PageMaker
  478. # "MP" marker for newer version 4 and above according to TrID
  479. #>108 string x \b, MARKER "%.2s"
  480. # http://www.nationalarchives.gov.uk/pronom/fmt/876
  481. !:mime application/vnd.pagemaker
  482. #!:mime application/x-pagemaker
  483. # different file name extensions are used depending on version
  484. # older version like 3
  485. >110 uleshort/256 =0 document
  486. # https://www.macdisk.com/macsigen.php
  487. !:apple ALB3ALD3
  488. # PT3 for template and no example for PageMaker document/publication with PM3 extension
  489. !:ext pm3/pt3
  490. >110 uleshort/256 =4 document
  491. !:apple ALD4ALB4
  492. # no example for PT4 template
  493. !:ext pm4/pt4
  494. >110 uleshort/256 =5 document
  495. !:apple ALD5ALB5
  496. # no example for PT5 template
  497. !:ext pm5/pt5
  498. >110 uleshort =0x0600 document
  499. !:apple ALD6ALB6
  500. # PT6 for template
  501. !:ext pm6/pt6
  502. # HOWTO to distinguish version 7 from 6.5 ?
  503. >110 uleshort =0x0632 document
  504. !:apple AD65AB65
  505. # no example for T65 template
  506. !:ext p65/t65/pmd/pmt
  507. # version 7 with PMT extension for template
  508. #!:ext pmd/pmt
  509. #!:apple ????PUBF
  510. # endian marker FF 99 for little endian
  511. >6 ubyte =0xFF \b, little-endian
  512. >6 ubyte =0x99 \b, big-endian
  513. # newer numeric version like: 4 5 6 6.50
  514. #>110 uleshort x \b, VERSION=%#x
  515. >110 uleshort >0x03FF
  516. >>110 uleshort/256 x \b, version %u
  517. >>110 uleshort%256 >0 \b.%u
  518. # older version like 3
  519. >110 uleshort <0x0400 \b, maybe version 3
  520. # adobe indesign (document, whatever...) from querkan
  521. 0 belong 0x0606edf5 Adobe InDesign
  522. >16 string DOCUMENT Document
  523. #------------------------------------------------------------------------------
  524. # ichitaro456: file(1) magic for Just System Word Processor Ichitaro
  525. #
  526. # Contributor kenzo-:
  527. # Reversed-engineered JS Ichitaro magic numbers
  528. #
  529. 0 string DOC
  530. >43 byte 0x14 Just System Word Processor Ichitaro v4
  531. !:mime application/x-ichitaro4
  532. >144 string JDASH application/x-ichitaro4
  533. 0 string DOC
  534. >43 byte 0x15 Just System Word Processor Ichitaro v5
  535. !:mime application/x-ichitaro5
  536. 0 string DOC
  537. >43 byte 0x16 Just System Word Processor Ichitaro v6
  538. !:mime application/x-ichitaro6
  539. # Type: Freemind mindmap documents
  540. # From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
  541. 0 string/w \<map\ version Freemind document
  542. !:mime application/x-freemind
  543. # Type: Freeplane mindmap documents
  544. # From: Felix Natter <fnatter@gmx.net>
  545. 0 string/w \<map\ version="freeplane Freeplane document
  546. !:mime application/x-freeplane
  547. # Type: Scribus
  548. # From: Werner Fink <werner@suse.de>
  549. 0 string \<SCRIBUSUTF8\ Version Scribus Document
  550. 0 string \<SCRIBUSUTF8NEW\ Version Scribus Document
  551. !:mime application/x-scribus
  552. # help files .hlp compiled from html and used by gfxboot added by Joerg Jenderek
  553. # markups page=0x04,label=0x12, followed by strings like "opt" or "main" and title=0x14
  554. 0 ulelong&0x8080FFFF 0x00001204 gfxboot compiled html help file
  555. # From: Joerg Jenderek
  556. # URL: https://en.wikipedia.org/wiki/StarOffice
  557. # Reference: http://mark0.net/download/triddefs_xml.7z
  558. # /defs/t/thm-staroffice.trid.xml
  559. # Note: used in Star-, Open- and Libre-Office
  560. # named as soffice.StarConfigFile.6 or OpenOffice.org configuration by others
  561. 0 ubeshort 0x0400
  562. # non nil gap
  563. #>(2.s+8) ubequad x \b, gap %#16.16llx
  564. # test for null value in gap after theme name maybe unreliable
  565. #>(2.s+9) ubyte 0 \b, 0-byte
  566. # look for keyword GALRESRV near the end
  567. # "C:\Program Files (x86)\StarOffice6.0\share\gallery\sg27.thm" Navigation, 238 objects
  568. #>0 search/8415 GALRESRV \b, GALRESRV found
  569. # "neues thema6.thm" MorePictures, 315 objects
  570. #>0 search/19299 GALRESRV \b, GALRESRV FOUND
  571. #>2 uleshort x \b, name length %u
  572. # skip file2147.chk by check for positive name length like for sg16.thm "3D"
  573. >2 uleshort >0
  574. # skip dBase printer form T6.PRF with misidentified gallery
  575. # name :\DBASE\IV\T6.txts by check for 1st object name or RESRV keyword
  576. # https://www.clicketyclick.dk/databases/xbase/xbase/dbase_ex.zip
  577. # template/t6/with_data/T6.PRF
  578. # by first char of object name or RESRV part of keyword GALRESRV
  579. >>(2.s+13) ubyte >0x1F StarOffice Gallery theme
  580. !:mime application/x-stargallery-thm
  581. # thm is also used for JPEG thumbnail images
  582. !:ext thm
  583. # gallery name often 1 word like: 3D sounds Diagrams Flussdiagramme Fotos
  584. # or like private://gallery/hidden/imgppt "Cisco - WAN - LAN"
  585. >>>2 pstring/h x %s
  586. # number of objects
  587. >>>(2.s+4) ulelong x \b, %u object
  588. # plural s
  589. >>>(2.s+4) ulelong !1 \bs
  590. # if available then display first object name
  591. >>>(2.s+4) ulelong >0
  592. # partial file name, URL or internal name like "dd2*" of 1st object or RESRV
  593. >>>>(2.s+11) pstring/h x \b, 1st %s
  594. # From: Joerg Jenderek
  595. # URL: http://fileformats.archiveteam.org/wiki/StarOffice_Gallery
  596. # Note: used in Star-, Open- and Libre-Office and found in directories like
  597. # %APPDATA%\Roaming\LibreOffice\4\user\gallery
  598. # $HOME/.config/libreoffice/4/user/gallery
  599. 0 string SGA3 StarOffice Gallery thumbnails
  600. # Unknown like 0x04000?0001000142
  601. #>4 ubequad x \b, UNKNOWN %#16.16llx
  602. #!:mime application/x-sdg
  603. !:mime application/x-stargallery-sdg
  604. !:ext sdg
  605. # display image magic for debugging purpose like 'BM'
  606. # looking like PC bitmap, Windows 3.x format with unknown compression
  607. #>11 string x \b, image magic '%-.2s'
  608. # inspect 1st GALLERY thumbnail magic by ./images with 1 space at end
  609. #>11 indirect x \b; contains