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

Emojis not supported in tags #87

Closed
grod220 opened this issue Jan 10, 2021 · 2 comments
Closed

Emojis not supported in tags #87

grod220 opened this issue Jan 10, 2021 · 2 comments

Comments

@grod220
Copy link

grod220 commented Jan 10, 2021

Describe the bug
Whenever an emoji is used, it does not write tags properly.

To Reproduce

exiftool.write(`myfile.jpg, {
  Description: '🦍 hello world',
});

This will produce a new file with the field written as ?????? hello world. I believe it is corrupting the field.

Expected behavior
Expected the field to save the emoji character.

Environment (please complete the following information):

  • OS and version: Mac OS X Catalina
  • Node.JS version: v15.0.1
@grod220 grod220 changed the title Emojis not supported Emojis not supported in tags Jan 10, 2021
@mceachen
Copy link
Member

Thanks for the report!

FWIW, "simple" emoji are supported, but compound emoji are not currently. I'll fix this now.

  1) WriteTask
       round-trip with an image
         round-trips a comment with an emoji:
      -⌚✨??????????????????????????????‍??????‍????????????‍♀️ Sun Jan 10 2021 13:48:52 GMT-0800 (Pacific Standard Time)
      +⌚✨🦏🌈🦍🦄🧑‍🤝‍🧑🚵‍♀️ Sun Jan 10 2021 13:48:52 GMT-0800 (Pacific Standard Time)

@mceachen
Copy link
Member

Crap: it's because of my home-grown html entity encoder (that I wrote to avoid external dependencies). If I switch it out for he, everything works.

he is used by 4.2 million projects, and it only adds 73.8 kB, so I think that's the better solution.

I'm publishing the fix now.

Thanks again for the bug report!

mceachen added a commit that referenced this issue Jan 10, 2021
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

2 participants