Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Update to Tika 1.8 #112

Closed
dadoonet opened this issue Feb 23, 2015 · 1 comment
Closed

Update to Tika 1.8 #112

dadoonet opened this issue Feb 23, 2015 · 1 comment
Assignees
Milestone

Comments

@dadoonet
Copy link
Member

When Tika 1.8 will be out, we can replace:

public static boolean isLocaleCompatible() {
    String language = Locale.getDefault().getLanguage();
    boolean acceptedLocale = true;

    if (
        // We can have issues with JDK7 Patch < 80
            (JVM_MAJOR_VERSION == 1 && JVM_MINOR_VERSION == 7 && JVM_PATCH_MAJOR_VERSION == 0 && JVM_PATCH_MINOR_VERSION < 80) ||
                    // We can have issues with JDK8 Patch < 40
                    (JVM_MAJOR_VERSION == 1 && JVM_MINOR_VERSION == 8 && JVM_PATCH_MAJOR_VERSION == 0 && JVM_PATCH_MINOR_VERSION < 40)
            ) {
        if (language.equalsIgnoreCase("tr") || language.equalsIgnoreCase("az")) {
            acceptedLocale = false;
        }
    }

    return acceptedLocale;
}

by

public static boolean isLocaleCompatible() {
    return true;
}

See https://issues.apache.org/jira/browse/TIKA-1526
See #105

@dadoonet
Copy link
Member Author

dadoonet commented May 7, 2015

Tika 1.8 has been released: https://dist.apache.org/repos/dist/release/tika/CHANGES-1.8.txt

@dadoonet dadoonet added the 2.6.0 label May 7, 2015
@dadoonet dadoonet added this to the 2.6.0 milestone May 7, 2015
@dadoonet dadoonet self-assigned this May 7, 2015
dadoonet added a commit that referenced this issue May 7, 2015
Tika 1.8 has been released. See https://dist.apache.org/repos/dist/release/tika/CHANGES-1.8.txt

We can replace:

```java
public static boolean isLocaleCompatible() {
    String language = Locale.getDefault().getLanguage();
    boolean acceptedLocale = true;

    if (
        // We can have issues with JDK7 Patch < 80
            (JVM_MAJOR_VERSION == 1 && JVM_MINOR_VERSION == 7 && JVM_PATCH_MAJOR_VERSION == 0 && JVM_PATCH_MINOR_VERSION < 80) ||
                    // We can have issues with JDK8 Patch < 40
                    (JVM_MAJOR_VERSION == 1 && JVM_MINOR_VERSION == 8 && JVM_PATCH_MAJOR_VERSION == 0 && JVM_PATCH_MINOR_VERSION < 40)
            ) {
        if (language.equalsIgnoreCase("tr") || language.equalsIgnoreCase("az")) {
            acceptedLocale = false;
        }
    }

    return acceptedLocale;
}
```

by

```java
public static boolean isLocaleCompatible() {
    return true;
}
```

Related to https://issues.apache.org/jira/browse/TIKA-1526 and #105

Note that Content-type has changed a bit and now returns something like `application/xhtml+xml; charset=ISO-8859-1` instead of `application/xhtml+xml`.

Closes #112.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant