I'm storing strings in TIFF headers using JAI. Some strings contain characters which value is greater than 127d (e.g. 'é'
is 233d
).
When I open the resulting TIFF file with an hex editor, I can see the byte 233d
, but when I try to read it back through JAI by the TIFFField.getAsString()
, I'm getting '?'
(Unicode 0xfffd
"replacement char").
I have checked the TIFF 6.0 specifications but they just mention "7-bits ASCII".
I would like to tell JAI to use ISO-8859-1
Charset
to decode strings. Is that possible? I haven't find anything in the (old) javadoc. As a last resort, I could also use URL-encoding for strings but would rather avoid that.