[wp-trac] [WordPress Trac] #23706: Image metadata encoding problem

WordPress Trac noreply at wordpress.org
Wed Mar 6 18:37:40 UTC 2013


#23706: Image metadata encoding problem
----------------------------------------+------------------
 Reporter:  pavelevap                   |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  3.6
Component:  Media                       |     Version:  3.0
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+------------------
Changes (by SergeyBiryukov):

 * keywords:   => has-patch needs-unit-tests
 * version:  trunk => 3.0
 * component:  General => Media
 * milestone:  Awaiting Review => 3.6


Comment:

 Introduced in [13244].

 `iptcparse()` returns the correct caption, but the result from
 `exif_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
 [http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2987.msg13406.html#msg13406
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23706#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list