exifr
exifr copied to clipboard
encoding problem with unicode character
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
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');
…
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.
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 withval = Buffer.from(val, 'latin1').toString('utf8');
…
sorry I missed that question. yes, you are right about the error