thuk thuk - 6 months ago 14
PHP Question

Decode base64 string - php

Is there any way to decode this string??

Actual string : 其他語言測試 - testing

base64 encode while sending on mail as subject as


echo base64_decode('GyRCQjZCPjhsOEBCLDtuGyhCIC0gdGVzdGluZw==');

This is base 64 encode, I couldn't decode it to actual Chinese string.Since it has been encoded using "iso-2022-jp", I have also tried online site to decode this string, but I couldn't find the original string, how can I do that?


Use iconv():

$input = base64_decode('GyRCQjZCPjhsOEBCLDtuGyhCIC0gdGVzdGluZw==');//$BB6B>8l8@B,;n(B - testing
$input_encoding = 'iso-2022-jp';
echo iconv($input_encoding, 'UTF-8', $input); //其他語言測試 - testing