Detect IPTC Encoding and read the data by one pass

Started by Archive, May 12, 2010, 08:54:40 AM

Previous topic - Next topic

Archive

[Originally posted by murat on 2009-09-30 15:27:44-07]

Hello Phil and ExifTool community.

Is there any way to automatically set the Encoding to parse the metadata (I mean 1:90 iptc tag)

Of course I can parse the file using -L or -iptc:codedcharacterset=utf8 parameters, but in this case I need to know the 1:90 tag value. But I don't know it before read the file, so I need to process a file two times:

1. To read 1:90 tag, 2. To read the other metadata using encoding parameter according 1:90 tag.

In case of C# it takes two much time to process the file. Is there a solution?

I hope yes, because the library is perfect in any aspects.

Thanks in any way.

--

Murat

Archive

[Originally posted by exiftool on 2009-09-30 15:42:07-07]

Hi Murat,

So the new "-charset IPTC=CHARSET" option doesn't do what you want?:

Code:
-charset [[TYPE=]CHARSET]

    If TYPE is "ExifTool" or not specified, this option sets the
    ExifTool character encoding for output tag values when reading and
    input values when writing.  The default ExifTool encoding is
    "UTF8".  If TYPE is "IPTC", this sets the internal IPTC encoding
    to use when IPTC:CodedCharacterSet is not defined.  The default
    IPTC charset is "Latin".  Prints a list of valid character sets if
    CHARSET is not given.  Valid CHARSET values are:

         CHARSET       Alias(es)                Description
        ----------  ---------------  ----------------------------------
        UTF8        cp65001, UTF-8   UTF-8 characters
        Latin       cp1252, Latin1   Windows Latin1 (West European)
        Latin2      cp1250           Windows Latin2 (Central European)
        Cyrillic    cp1251, Russian  Windows Cyrillic
        Greek       cp1253           Windows Greek
        Turkish     cp1254           Windows Turkish
        Hebrew      cp1255           Windows Hebrew
        Arabic      cp1256           Windows Arabic
        Baltic      cp1257           Windows Baltic
        Vietnam     cp1258           Windows Vietnamese
        Thai        cp874            Windows Thai
        MacRoman    cp10000, Roman   Macintosh Roman
        MacLatin2   cp10029          Macintosh Latin 2 (Central Europe)
        MacCyrillic cp10007          Macintosh Cyrillic
        MacGreek    cp10006          Macintosh Greek
        MacTurkish  cp10081          Macintosh Turkish
        MacRomanian cp10010          Macintosh Romanian
        MacIceland  cp10079          Macintosh Icelandic
        MacCroatian cp10082          Macintosh Croatian

- Phil

Archive

[Originally posted by murat on 2009-09-30 16:24:53-07]

I use 7.82 version, so I'll upgraded and check this option. Thanks for so prompt reply.

--

Murat