'For compatibility with OS X/iTunes.
See https://github.com/beetbox/beets/issues/899#issuecomment-62437773'

def test_image_encoding(self):

    for v23 in [True, False]:
        mf = self._make_test(id3v23=v23)
        try:
            mf.images = [mediafile.Image('data', desc=u''), mediafile.Image('data', desc=u'foo'), mediafile.Image('data', desc=u'\u0185')]
            mf.save()
            apic_frames = mf.mgfile.tags.getall('APIC')
            encodings = dict([(f.desc, f.encoding) for f in apic_frames])
            self.assertEqual(encodings, {u'': mutagen.id3.Encoding.LATIN1, u'foo': mutagen.id3.Encoding.LATIN1, u'\u0185': mutagen.id3.Encoding.UTF16})
        finally:
            self._delete_test()
