#23706 closed defect (bug) (fixed)
Image metadata encoding problem
Reported by: | pavelevap | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Media | Keywords: | has-patch needs-unit-tests 3.9-early commit |
Focuses: | Cc: |
Description
I uploaded picture DSCF4480.jpg (attached for testing).
Metadata for title and caption should be the same: "Bystřice u Benešova". But after upload title is right, but caption is damaged:
'caption' => 'Bystøice u Beneova', 'title' => 'Bystřice u Benešova'
Using latest trunk.
Attachments (2)
Change History (16)
#1
@
12 years ago
- Component changed from General to Media
- Keywords has-patch needs-unit-tests added
- Milestone changed from Awaiting Review to 3.6
- Version changed from trunk to 3.0
#3
@
11 years ago
- Keywords early added
- Milestone changed from 3.6 to Future Release
Punting this as we're focusing on 3.6 blockers now. Let's get this done early in 3.7.
#4
@
11 years ago
Tested with latest 3.6, there were probably some changes.
Title is the same, but caption is in database without encoding problem now. I am not sure what was changed?
The only strange thing is that caption value is saved in metadata, but displayed as Desription field (in Media library) and Caption field is empty (post_excerpt value)?
#8
@
11 years ago
- Owner set to SergeyBiryukov
- Status changed from new to assigned
Sergey, if this is good to go, please commit.
#9
@
11 years ago
- Keywords 3.9-early added; early removed
- Milestone changed from 3.8 to Future Release
#12
follow-up:
↓ 13
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Please see my older comment: https://core.trac.wordpress.org/ticket/23706#comment:4
The only strange thing is that caption value is saved in metadata, but displayed as Desription field (in Media library) and Caption field is empty (post_excerpt value)?
And another note. We are saving these really long values into database (you can test attached image)? Is it really needed?
aperture = 3.20000000000000017763568394002504646778106689453125 shutter_speed = 0.0066666666666667
#13
in reply to:
↑ 12
@
10 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Replying to pavelevap:
The only strange thing is that caption value is saved in metadata, but displayed as Desription field (in Media library) and Caption field is empty (post_excerpt value)?
And another note. We are saving these really long values into database (you can test attached image)? Is it really needed?
Why not keep data that's there? Also, that doesn't seem like a part of this ticket.
Introduced in [13244].
iptcparse()
returns the correct caption, but the result fromexif_read_data()
overwrites it:http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/image.php#L244
This is what we get from
iptcparse()
:This what we get later after merging with
exif_read_data()
:According to this reply, the EXIF:ImageDescription tag does not officially support UTF-8.
I guess we should only fill in the missing data instead of stomping on existing values.