SublimeTextXdebug icon indicating copy to clipboard operation
SublimeTextXdebug copied to clipboard

base64 values should be decoded with proper encodings

Open risperdal opened this issue 10 years ago • 3 comments

base64 values should be decoded with proper encodings

base64 properties was always been decoded with base64.b64decode(data).decode('utf8')

which is a strict mode. It throws UnicodeDecodeError exception when the property value is not UTF-8

risperdal avatar Aug 26 '15 20:08 risperdal

To reproduce issue

utf8.php (save with encoding utf-8)

<?php
$utf_str = "ç ı ü ğ ö ş İ Ğ Ü Ö Ş Ç";

echo $utf_str;

include "win1254.php";
?>

save it to same folder win1254.php (save with encoding windows-1254)

<?php
$deneme = array('ÇOK GÜZELMİŞ' => 'şanlıurfa'); //put breakpoint here
$win1254_str = "ç ı ü ğ ö ş İ Ğ Ü Ö Ş Ç";
echo $win1254_str;
?>

put a breakpoint to win1254.php line 1 open a browser and locate to utf8.php and try to debug

risperdal avatar Aug 26 '15 20:08 risperdal

should solve issue #110

risperdal avatar Aug 27 '15 09:08 risperdal

I would like to merge your fixes into my fork: https://github.com/ryanpcmcquen/SublimeTextXdebugPlus

Would you mind rebasing them against the master branch?

I am attempting to get my fork into Package Control: https://github.com/wbond/package_control_channel/pull/7658

ryanpcmcquen avatar Aug 14 '19 23:08 ryanpcmcquen