gansheer opened a new pull request, #9441:
URL: https://github.com/apache/camel-quarkus/pull/9441

   Fixes #9392
   
   `MojibusterEncodingDetector`, brought transitively by 
`tika-parser-text-module`, fails in native mode for two reasons:
   
   1. It loads `nb-bigram.bin` and `utf16-specialist.bin` from 
`org/apache/tika/ml/chardetect`, which is not in the image. Now registered 
under a class-present guard, so builds without the text parser module don't pay 
for it.
   2. It resolves charsets by name (`windows-1252`, `ISO-8859-*`, `Shift_JIS`, 
...), which native images only partly bundle. Registering the models alone 
turns the current warning into `UnsupportedCharsetException: windows-1252` on   
every plain-text/XML parse. Fixed by producing 
`NativeImageEnableAllCharsetsBuildItem`, the supported Quarkus API for this 
(same as `Jt400Processor`).
   
   Cost: ~6.5 MB on the tika integration test image (156 MB → 162.6 MB). Since 
the extension requests the charsets, `quarkus.native.add-all-charsets=false` 
cannot disable them. Both points are documented in the extension usage page, 
along with the need to keep the native image working out of the box.
   
     Verified: `mvn -Pnative verify` in `integration-tests/tika` with the 
Mandrel jdk-25 builder image — `TikaIT` and `TikaTest` 10/10, driver command 
line carries `-H:+AddAllCharsets`. `-Pformat` clean.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to