No. Invalid input is invalid input, and there's no way to fix that
since it is literally not known what character there might be.
Consider that UTF-8 encoding allows different byte lengths so it is
not just one character that could be wrong but one or two
of following ones.
What you can do is, in order of preference:
1) Fix (or tell someone else to fix) whatever is producing invalid
content. That code is broken.
2) Use a single-byte encoding like ISO-8859-1 (latin-1) -- or one of
other 8859-x encodings -- to decode.
You have to construct your own `InputStreamReader` with encoding
of your choice. You can then pass that content
3) Pre-process content using some other mechanism (custom
InputStreamReader; use JDK's mechanisms that may opt to
speculatively give 0xFFFE marker) to work around the problem.
I hope this helps,
-+ Tatu +-
-+ Tatu +-
> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
jackson-user...@googlegroups.com.
> To post to this group, send email to
jackso...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.