exifr icon indicating copy to clipboard operation
exifr copied to clipboard

encoding problem with unicode character

Open dukemai opened this issue 3 years ago • 3 comments

from the version 6.1.1 we experienced text encoding issues from author field (it can be any field I guess). The text we expected is Teknikens värld but what we got back is Teknikens Värld. I believe there is a fix in changelog affects that

dukemai avatar Oct 22 '21 16:10 dukemai

Yes. I figured out similar behaviour. @dukemai Can you confirm if this comes from iptc ? You need to parse with options like {mergeOutput: false, xmp: true, iptc: true, icc: true} …

Reason / Fix; The iptc parser reads a Latin1 but does not convert it to utf8 …

After line 86 let val = this.chunk.getLatin1String(offset + 5, size) it could be fixed with val = Buffer.from(val, 'latin1').toString('utf8'); …

sebilasse avatar Feb 24 '22 10:02 sebilasse

I'm encountering an issue that may be related to this. The Caption field appears to use the wrong encoding, while ImageDescription uses the correct encoding:

  Caption: 'Carrer de Sepúlveda',
  ImageDescription: 'Carrer de Sepúlveda',

Keywords also appears to use the wrong encoding.

DePasqualeOrg avatar Apr 17 '22 12:04 DePasqualeOrg

Yes. I figured out similar behaviour. @dukemai Can you confirm if this comes from iptc ? You need to parse with options like {mergeOutput: false, xmp: true, iptc: true, icc: true} …

Reason / Fix; The iptc parser reads a Latin1 but does not convert it to utf8 …

After line 86 let val = this.chunk.getLatin1String(offset + 5, size) it could be fixed with val = Buffer.from(val, 'latin1').toString('utf8'); …

sorry I missed that question. yes, you are right about the error

dukemai avatar May 25 '22 13:05 dukemai