Open ticklemynausea opened 8 years ago
Hi. I've come across this issue when processing photos with tags that have multibyte characters. Such names appear garbled when retrieved using node-exif.
node-exif
To reproduce, add a tag like this to an image if you don't have one already
❯ exiftool -artist='Bélà Lugôsí' image.jpg 1 image files updated
Retrieving the info with identify gives us the name correctly
identify
❯ identify -verbose image.jpg | grep Artist exif:Artist: Bélà Lugôsí
Now, using node-exif in a REPL environment:
> new require('exif').ExifImage({ image: 'image.jpg' }, (error, info) => console.log(info.image.Artist)),null; null > Bélà LugôsÃ
The characters with diacritic marks are two-byte characters, but node-exif doesn't recognize them as such.
Hi. I've come across this issue when processing photos with tags that have multibyte characters. Such names appear garbled when retrieved using
node-exif
.To reproduce, add a tag like this to an image if you don't have one already
Retrieving the info with
identify
gives us the name correctlyNow, using node-exif in a REPL environment:
The characters with diacritic marks are two-byte characters, but
node-exif
doesn't recognize them as such.