News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

Invalid characters added when using convert_regions.config

Started by José Oliver-Didier, March 09, 2022, 07:45:07 PM

Previous topic - Next topic

José Oliver-Didier

I am using the convert_regions.config for copying the MP WLPG or IPTC regions to MWG regions:

exiftool -config convert_regions.config "-RegionInfo<MPRegion2MWGRegion" *.jpg -overwrite_original

However, I have noticed that certain characters are intepreted differently for example "é" becomes gibrish when read by "Geosetter". I am running Windows 11 and tried changing the console charset using chcp 65001 as well as using the -L as well as -char utf8 flags in the exiftool commands to no avail. What am I doing wrong?

StarGeek

I think that this is a Geosetter problem.

I took a test image and added a region with the é character in it.  Loaded the file into Imatch and it displayed correctly.  Listed the region with exiftool and it was correct.  Loaded the image into Geosetter and it was mojibaked into é.

No problem with similar characters in other locations, as I set XMP:State to "Provence-Alpes-Côte d'Azur" and "Côte" showed up correctly.  But set the RegionName to "Côte" and it became CA'te.  Even a direct copy with "-RegionName<State" did the same thing so it isn't a problem with the config file.
Troubleshooting hints:
* Did you read FAQ #3 and use the command listed there?
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.

Phil Harvey

@StarGeek: Look at you with the new words! ;)   mojibaked  :P

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

José Oliver-Didier

Seems that @StarGeek is correct it may be an issue with GeoSetter.

From the XMP, the only difference I see is in how it is structured:

Exiftool (People's names are mojibaked in GeoSetter):

    <rdf:Bag>
     <rdf:li rdf:parseType='Resource'>
      <mwg-rs:Area rdf:parseType='Resource'>
       <stArea:h>0.0813492</stArea:h>
       <stArea:unit>normalized</stArea:unit>
       <stArea:w>0.0528274</stArea:w>
       <stArea:x>0.4854907</stArea:x>
       <stArea:y>0.5849866</stArea:y>
      </mwg-rs:Area>
      <mwg-rs:Name>José</mwg-rs:Name>
      <mwg-rs:Type>Face</mwg-rs:Type>
     </rdf:li>


Digikam (People's names are read correctly in GeoSetter):

<rdf:li>
<rdf:Description mwg-rs:Name="José" mwg-rs:Type="Face">
          <mwg-rs:Area stArea:x="0.485491" stArea:y="0.584987" stArea:w="0.0528274" stArea:h="0.0813492" stArea:unit="normalized"/>
         </rdf:Description>
</rdf:li>


In both instances Digikam reads the names correctly.

StarGeek

Ok that's just very weird.

Add -api Compact=Shorthand and geosetter will display it correctly.

You can fix "broken" regions with
exiftool -RegionInfo= -TagsFromFile @ -RegionInfo -api Compact=Shorthand /path/to/files/

Troubleshooting hints:
* Did you read FAQ #3 and use the command listed there?
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.

José Oliver-Didier

After trying the shorthand conversion, it displayed correctly in Geosetter. Indeed, very weird on the part of Geosetter.

I opened a bug in Geosetter's bug tracking Mantis db. https://www.geosetter.de/mantis/view.php?id=2274

I have not seen much development going on with Geosetter, but still you never know.

Thanks again, Phill and StarGeek!

StarGeek

Quote from: José Oliver-Didier on March 10, 2022, 03:09:40 PMI have not seen much development going on with Geosetter, but still you never know.

It looks like the only issues that are being closed are spam.  So someone's looking at it, but only to deal with the spam.
Troubleshooting hints:
* Did you read FAQ #3 and use the command listed there?
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.