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

wrong language ("tr" instead of "ru") is assigned for recognized charset "windows-1251"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • parser
    • None
    • Patch

    Description

      CharsetDetector is detecting windows_1251 using detector  org.apache.tika.parser.txt.CharsetRecog_windows_1251

       

      This detector is creating CharsetMatch with language "tr", but should be "ru".

       

      static class CharsetRecog_windows_1251 extends CharsetRecog_sbcs {
       
        ...
      
        public String getLanguage() {
          return "ru";
        }
      
        public CharsetMatch match(CharsetDetector det) {
        int confidence = match(det, ngrams, byteMap);
          return confidence == 0 ? null : new CharsetMatch(det, this, confidence, getName(),   "tr");
        }
      }
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            lukashov-alexey Alexey Lukashov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified