@Override
    public String getValue(final TiffField entry) throws ImagingException {
        if (entry.getFieldType() != AbstractFieldType.BYTE) {
            throw new ImagingException("Text field not encoded as bytes.");
        }
        final byte[] bytes = entry.getByteArrayValue();
        final int length;
        if (bytes.length >= 2 && bytes[bytes.length - 1] == 0 && bytes[bytes.length - 2] == 0) {
            length = bytes.length - 2;
        } else {
            length = bytes.length;
        }
        return new String(bytes, 0, length, StandardCharsets.UTF_16LE);
    }
Windows XP onwards store some tags using UTF-16LE, but the field type is byte - here we deal with this.
src/main/java/org/apache/commons/imaging/formats/tiff/taginfos/TagInfoXpString.java