Doc #64739 [Asn->Csd]: Invalid Title and Author data returned
| From: | kalle@php.net | Date: | Sat, 22 Jul 2017 21:08:52 +0000 |
| Subject: | Doc #64739 [Asn->Csd]: Invalid Title and Author data returned | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14858@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64739&edit=1
ID: 64739
Updated by: kalle@php.net
Reported by: php-qa at sebastianmendel dot de
Summary: Invalid Title and Author data returned
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: EXIF related
Operating System: Linux
PHP Version: 5.4.14
Assigned To: kalle
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2017-07-22 21:07:50] kalle@php.net
I have updated the docs for this
------------------------------------------------------------------------
[2017-07-22 14:52:08] kalle@php.net
I totally agree with you on this, possibly having to iterate charsets just to make it decode is non
sense to me as well.
I will update the docs accordingly
Side note: I'm working on a new extension to see if it can replace the exif one at one point if
you are interested, keep in mind its very basic: http://github.com/KalleZ/pecl-exifkit
------------------------------------------------------------------------
[2017-07-22 13:51:03] php-qa at sebastianmendel dot de
The problem is you never know which encoding is used and if you process a lot of pictures which are
always changing - in a CMS - you will always loose.
Ok, so at least the manual page should have a hint about this.
------------------------------------------------------------------------
[2017-07-21 19:41:35] kalle@php.net
I have given this some thought and attempts and trying to solve this in an automatic behavior, but
its almost impossible with the current implementation of EXIF in ext/exif. Therefore I recommend to
change the ini setting if the image contains another byte order than that of the default charset
used to decode it with.
TL;DR for your image you would therefore do:
exif.decode_unicode_motorola=UCS-2LE
Apologies again, but I don't see any other clear way to go about this
------------------------------------------------------------------------
[2017-07-14 01:37:50] kalle@php.net
I debugged it a little further, it seems that internally ext/exif detects the image byte order as
Motorola, which causes it to use a wrong encoding to process the tags (from the WINXP section).
A temporary hack can be done by modifying the exif.decode_unicode_motorola ini directive:
[exif]
exif.decode_unicode_motorola=UCS-2LE
(It defaults to UCS-2BE)
I'm gonna look into possible approaches for solving this
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=64739
--
Edit this bug report at https://bugs.php.net/bug.php?id=64739&edit=1