RAT-532: Bump tika.version from 3.3.2 to 4.0.0 and migrate charset detection - #714
RAT-532: Bump tika.version from 3.3.2 to 4.0.0 and migrate charset detection#714dependabot[bot] wants to merge 2 commits into
Conversation
Bumps `tika.version` from 3.3.2 to 4.0.0. Updates `org.apache.tika:tika-core` from 3.3.2 to 4.0.0 - [Changelog](https://github.com/apache/tika/blob/main/CHANGES.txt) - [Commits](apache/tika@3.3.2...4.0.0) Updates `org.apache.tika:tika-parser-text-module` from 3.3.2 to 4.0.0 --- updated-dependencies: - dependency-name: org.apache.tika:tika-core dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: org.apache.tika:tika-parser-text-module dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* Upgrade to Tika v4.0.0 * Migrate to new charset detection logic of Tika 4. * It returns the best possible guess as encoding. * In contrast to v3.x windows-1252 is detected instead of UTF-8/ISO-8859-1, thus tests had to be changed as well for all UIs. * Keep the performance optimisation (read only 256 bytes) introduced via RAT-494
|
|
@Claudenw would you mind starting a review (I'll add the tests to pass the quality build later). The new Tika4 API detects charsets differently, thus so many changes in test expectations. WDYT? |
| --> | ||
| <release version="1.0.0-SNAPSHOT" date="xxxx-yy-zz" description="Current SNAPSHOT - release to be done"> | ||
| <action issue="RAT-532" type="add" dev="pottlinger"> | ||
| Update to Tika 4.0.0: new charset detection logic in Tika returns different values compared to 3.x before, such as windows-1252 instead of ISO-8859-1. |
There was a problem hiding this comment.
I think this is an error. We have some windows-1252 files but most are ISO-8859-1
I think for our purpose we can label windows-1252 as ISO-8859-1. I need to check the list that is returned from the new Tika and see if it includes ISO-8859-1 as one of the encodings. I think we should select ISO over windows when we have the option. This PR needs investigation and work.
There was a problem hiding this comment.
The Tika4 logics is to return the "best" charset. In contrast to version 3.x this changed into windows-1252. The new implementation returns the first hit. Personally I wouldn't want to introduce new logics on the RAT-side to generalise into ISO-8859-1 and would take the change as tika-induced and document it in our changelog.
| if (results.isEmpty()) { | ||
| DefaultLog.getInstance().debug(String.format("No encoding found for file '%s'", documentName)); | ||
| return null; | ||
| } |
There was a problem hiding this comment.
This code does not do the same thing. the debug should be a warning.
And what happend to unsupported character sets?
There was a problem hiding this comment.
We do not have an explicit test for unsuppoorted character sets. Tika handles this internally and returns no charset. If no charset is returned RAT will mark as UNKNOWN if I'm not too mistaken.


Bumps
tika.versionfrom 3.3.2 to 4.0.0.Updates
org.apache.tika:tika-corefrom 3.3.2 to 4.0.0Changelog
Sourced from org.apache.tika:tika-core's changelog.
... (truncated)
Commits
514e1b3[maven-release-plugin] prepare release 4.0.0-rc14e39e07revert second rc1 attempt7975986javadocs take 4295d4235[maven-release-plugin] prepare for next development iteration666289b[maven-release-plugin] prepare release 4.0.0-rc1c9f6585TIKA-4808 - revert aborted 4.0.0-rc1 release commits; fix per-module javadoc ...41183e7[maven-release-plugin] prepare for next development iteration5dd7fc7[maven-release-plugin] prepare release 4.0.0-rc14b231cfTIKA-4808 -- prep CHANGES.txt for release532a685TIKA-4808 - remove access to the network parser from cli (#3036)Updates
org.apache.tika:tika-parser-text-modulefrom 3.3.2 to 4.0.0Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)