Malformed EXIF text
Cameras and metadata editors sometimes store EXIF text as MacRoman or
Windows-1252 instead of UTF-8. Damaged maker notes can also expose binary data
as City, Country, Location, or Title.
PhotoStructure:
- ignores collision-prone maker-note fields by default;
- cuts a tag path at its first malformed segment, so descendants are never promoted;
- uses a valid country code when the free-text country is corrupt; and
- prefers clean title or description fields, but keeps readable damaged prose when ExifTool reports the corresponding malformed bytes.
Legacy text is recovered from evidence in this order:
- CRLF in the affected bytes selects
windows-1252. - Otherwise, a bare carriage return selects
macintosh. - A matching
exifCharsetByCamerarule is the fallback.
The byte evidence wins because another application may have rewritten the metadata after the camera created the file.
Configure a camera charset
exifCharsetByCamera is a library
setting. Keys match
Make/Model, then Make, case-insensitively:
exifCharsetByCamera = { "KODAK/DCS Pro 14nx" = "macintosh" }
The environment-variable form is JSON:
PS_EXIF_CHARSET_BY_CAMERA='{"KODAK/DCS Pro 14nx":"macintosh"}'
Configure excluded EXIF fields
PhotoStructure excludes these unsafe or collision-prone fields by default:
excludedExifTags = [
"MWG:Description",
"MakerNotes:City",
"MakerNotes:State",
"MakerNotes:Country",
"MakerNotes:Location",
"MakerNotes:Title"
]
Every entry must include its group. If you use Panasonic’s on-camera travel
metadata, remove only the maker-note entries you trust. Keep MWG:Description
excluded because its value can become stale when an XMP sidecar file replaces
the underlying description.
The environment-variable form is a JSON array:
PS_EXCLUDED_EXIF_TAGS='["MWG:Description","MakerNotes:City","MakerNotes:State","MakerNotes:Country","MakerNotes:Location","MakerNotes:Title"]'
Rebuild your library after changing either setting.
