PHP 8.5.0 Alpha 1 available for testing

Voting

: seven minus one?
(Example: nine)

The Note You're Voting On

dbareis at gmail dot com
1 year ago
Windows fields are in a "WINXP" section (the format I don't know), but they are also elsewhere including "comments" & "subject" in null terminated "UTF-16LE" format, this code work for me:

...
$PhotoInfo->Comments = GetPhotoValueWindows16Bit($IDFO, 'Comments');
$PhotoInfo->Subject = GetPhotoValueWindows16Bit($IDFO, 'Subject');

function GetPhotoValueWindows16Bit(&$Array, $Index)
{
$Value16 = GetPhotoValue($Array, $Index);
if ($Value16 === null)
$R = null;
else
{
$R = iconv('UTF-16LE', 'UTF-8', $Value16); //Still ends in a null byte
$R = str_replace("\x00", '', $R); //Remove trailing null (but handle any).
}
return $R;
}

<< Back to user notes page

To Top