View Issue Details

IDProjectCategoryView StatusLast Update
0000016fileGeneralpublic2018-08-01 12:05
Reportercbiedl Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinuxOSDebianOS Versionall
Fixed in Version5.35 
Summary0000016: magic for AutoCAD Drawing Exchange Format
DescriptionDebian bug https://bugs.debian.org/702744

The original proposal introduced a lot of regressions; I reworked it
and found no mis-detection even after checking my huge collection.

Still this could take some improvement, especially the regular
expression should better be something less expensive.

So for the record, the file format is something like:

* Format is text, line-based, DOS line endings
* The first four lines are

    0
    SECTION
    2
    HEADER

  where at least the numbers might be indented with whitespace.
* Further below there might be a keyword like "AC1006", denoting the
  actual version.

Also, the \000 in the first pattern is just a dirty hack to avoid the
string "ASCII text, with CRLF line terminators" is appended to the
output. Which, although technically correct, adds more confusion than
help, YMMV.



# AutoCAD Drawing Exchange Format
0 regex \^[\ \t]*0\r?\000$
>1 regex \^[\ \t]*SECTION\r?$
>>2 regex \^[\ \t]*2\r?$
>>>3 regex \^[\ \t]*HEADER\r?$ AutoCAD Drawing Exchange Format
!:mime application/x-dxf
!:ext dxf

>>>>&1 search/8192 AC1006 \b, R10
>>>>&1 search/8192 AC1009 \b, R11/R12
>>>>&1 search/8192 AC1012 \b, R13
>>>>&1 search/8192 AC1014 \b, R14
>>>>&1 search/8192 AC1015 \b, version 2000
>>>>&1 search/8192 AC1018 \b, version 2004
>>>>&1 search/8192 AC1021 \b, version 2007
>>>>&1 search/8192 AC1024 \b, version 2010
TagsNo tags attached.

Activities

christos

2018-08-01 12:05

manager   ~0000034

Applied, thanks

Issue History

Date Modified Username Field Change
2018-07-24 20:05 cbiedl New Issue
2018-08-01 12:05 christos Assigned To => christos
2018-08-01 12:05 christos Status new => assigned
2018-08-01 12:05 christos Status assigned => resolved
2018-08-01 12:05 christos Resolution open => fixed
2018-08-01 12:05 christos Fixed in Version => 5.35
2018-08-01 12:05 christos Note Added: 0000034