php-ffprobe icon indicating copy to clipboard operation
php-ffprobe copied to clipboard

json_decode() only works with UTF-8 encoded strings.

Open LeeSanghoon opened this issue 12 years ago • 0 comments

First of all, THANKS FOR YOUR COOOOOOL CODE~

There need utf8_encode() between json_decode() and shell_exec().

From

$json = json_decode(shell_exec(sprintf('ffprobe %s %s', $options, escapeshellarg($filename))));

To

$json = json_decode(utf8_encode(shell_exec(sprintf('ffprobe %s %s', $options, escapeshellarg($filename)))));

LeeSanghoon avatar Jan 06 '14 08:01 LeeSanghoon