Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-2047

TXTParser overwrites mime type/masks types that are subtype of text

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.13
    • Fix Version/s: 2.0, 1.14
    • Component/s: parser
    • Labels:
      None

      Description

      For vcal and other mime types that are subclasses of text/plain, the TXTParser overwrites their mime type as "text/plain". We should check to see what mime has been sent in via the Metadata and add the charset to that, e.g. "text/calendar; charset=ISO-8859-1"...right?

                  Charset charset = reader.getCharset();
                  MediaType type = new MediaType(MediaType.TEXT_PLAIN, charset);
                  metadata.set(Metadata.CONTENT_TYPE, type.toString());
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tallison@apache.org Tim Allison
                Reporter:
                tallison@apache.org Tim Allison
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: