---
title: Malformed EXIF text
url: https://photostructure.com/guide/malformed-exif-text/
description: How PhotoStructure rejects damaged EXIF labels and recovers legacy text encodings
date: 2026-07-17
keywords: metadata, settings, tags, troubleshooting, import
---


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:

1. CRLF in the affected bytes selects `windows-1252`.
2. Otherwise, a bare carriage return selects `macintosh`.
3. A matching `exifCharsetByCamera` rule 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](/getting-started/advanced-settings/#library-settings). Keys match
`Make/Model`, then `Make`, case-insensitively:

```toml
exifCharsetByCamera = { "KODAK/DCS Pro 14nx" = "macintosh" }
```

The environment-variable form is JSON:

```sh
PS_EXIF_CHARSET_BY_CAMERA='{"KODAK/DCS Pro 14nx":"macintosh"}'
```

## Configure excluded EXIF fields

PhotoStructure excludes these unsafe or collision-prone fields by default:

```toml
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:

```sh
PS_EXCLUDED_EXIF_TAGS='["MWG:Description","MakerNotes:City","MakerNotes:State","MakerNotes:Country","MakerNotes:Location","MakerNotes:Title"]'
```

[Rebuild your library](/guide/library-rebuilds/) after changing either setting.

