No subject


Sat Mar 14 20:08:29 EDT 2009


  <mime-type type=3D"application/vnd.oasis.opendocument.text">
    <comment>ODT document</comment>
    <comment xml:lang=3D"be at latin">Dakument ODT</comment>
    ...
    <comment xml:lang=3D"vi">T=C3=A0i li=E1=BB=87u ODT</comment>
    <acronym>ODT</acronym>
    <expanded-acronym>OpenDocument Text</expanded-acronym>
    <sub-class-of type=3D"application/zip"/>
    <generic-icon name=3D"x-office-document"/>
    <magic priority=3D"50">
      <match value=3D"PK\003\004" type=3D"string" offset=3D"0">
        <match value=3D"mimetype" type=3D"string" offset=3D"30">
          <match value=3D"application/vnd.oasis.opendocument.text"
type=3D"string" offset=3D"38"/>
        </match>
      </match>
    </magic>
    <glob pattern=3D"*.odt"/>
  </mime-type>

This works for .odt files because at the beginning of the zip file
there's an uncompressed file named "mimetype" that contains the mime
type. That's why at the offset 38 we should find the string
"application/vnd.oasis.opendocument.text".

Some info here:

http://books.evc-cit.info/odbook/ch01.html

Regards,

Tomeu

> -walter
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
>


More information about the Sugar-devel mailing list