#23706 closed defect (bug) (fixed)
Image metadata encoding problem
| Reported by: | pavelevap | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.0 |
| Component: | Media | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch needs-unit-tests 3.9-early commit |
| Cc: | Focuses: |
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
@
14 years ago
- Component General → Media
- Keywords has-patch needs-unit-tests added
- Milestone Awaiting Review → 3.6
- Version trunk → 3.0
#3
@
13 years ago
- Keywords early added
- Milestone 3.6 → Future Release
Punting this as we're focusing on 3.6 blockers now. Let's get this done early in 3.7.
#4
@
13 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)?
#12
follow-up:
↓ 13
@
12 years ago
- Resolution fixed
- Status closed → 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
@
12 years ago
- Resolution → fixed
- Status reopened → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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():Array ( [aperture] => 0 [credit] => mirekk [camera] => [caption] => Přístupový chodník k 1.koleji (budoucí směr Tábor) [created_timestamp] => 0 [copyright] => http://www.4koridor.cz [focal_length] => 0 [iso] => 0 [shutter_speed] => 0 [title] => Bystřice u Benešova )This what we get later after merging with
exif_read_data():Array ( [aperture] => 3.2 [credit] => mirekk [camera] => FinePix S9600 [caption] => Byst�ice u Bene�ova [created_timestamp] => 1348422433 [copyright] => http://www.4koridor.cz [focal_length] => 6.2 [iso] => 100 [shutter_speed] => 0.00666666666667 [title] => Bystřice u Benešova )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.