Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled unicode sequences when retrieving exif metadata #56

Open
ticklemynausea opened this issue Sep 16, 2016 · 0 comments
Open

Garbled unicode sequences when retrieving exif metadata #56

ticklemynausea opened this issue Sep 16, 2016 · 0 comments

Comments

@ticklemynausea
Copy link

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

❯ exiftool -artist='Bélà Lugôsí' image.jpg
    1 image files updated

Retrieving the info with identify gives us the name correctly

❯ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant