Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1829

PlainTextExtractor returns an empty reader when encoding is unsupported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.5
    • None
    • Reproduced in Linux and Windows

    Description

      PlainTextExtractor is failing to index text files. Searching for content in text files is not coming back with results.

      On the extractText(InputStream stream, String type, String encoding) method, the encoding is coming in as an empty string, and it throws the java.io.UnsupportedEncodingException at line 40 ( return new InputStreamReader(stream, encoding); ).

      modifying the following statement fixes the problem:
      before: if (encoding != null) {
      after: if (encoding != null && !encoding.equals("")) {

      Attachments

        Activity

          People

            Unassigned Unassigned
            trollswagen hector rovira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified