apache / apache/maven-acr-plugin

Consider using Apache Tika instead of Plexus for encoding detection

Open
#125 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
7
Forks
8
Avg merge
15m
Merged PRs (30d)
2

Description

### New feature, improvement proposal

```
static String detectEncoding(File file) throws IOException {
Tika tika = new Tika();
// Tika's detect method checks for explicit declarations (like XML)
// and BOMs, then falls back to robust statistical analysis.
String detectedEncoding = tika.detect(file.toPath());

// Tika's detect() returns a MIME type like "text/plain; charset=UTF-8" or just "UTF-8".
if (detectedEncoding.contains("charset=")) {
return detectedEncoding.substring(detectedEncoding.indexOf("charset=") + 8);
}
return detectedEncoding;
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue proposes replacing Plexus encoding detection with Apache Tika but names no file or test. Locate the current Plexus detection entry point and dependency configuration, then compare Tika's returned values with the plugin's expected encoding value. Done means the replacement's behavior and compatibility are verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.