@Test
    void testEncodingSupport() throws IOException, ImagingException {
        // NOTE: We use the JpegParser, so it will send only the block/segment that IptcParser needs for the test image
        final File file = TestResources.resourceToFile("/images/jpeg/iptc/IMAGING-168/111083453-c07f1880-851e-11eb-8b61-2757f7d934bf.jpg");
        final JpegImageParser parser = new JpegImageParser();
        final JpegImageMetadata metadata = (JpegImageMetadata) parser.getMetadata(file);
        final JpegPhotoshopMetadata photoshopMetadata = metadata.getPhotoshop();
        @SuppressWarnings("unchecked")
        final List<GenericImageMetadataItem> items = (List<GenericImageMetadataItem>) photoshopMetadata.getItems();
        final GenericImageMetadataItem thanksInMandarin = items.get(3);
        // converted the thank-you in chinese characters to unicode for comparison here
        assertArrayEquals("\u8c22\u8c22".getBytes(StandardCharsets.UTF_8), thanksInMandarin.getText().getBytes(StandardCharsets.UTF_8));
    }
Tests for IptcParser encoding support. See IMAGING-168 and pull request #124 for more.

@throws IOException      when reading input
@throws ImagingException when parsing file
src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcParserTest.java