Skip to content

Conversation

@risperdal
Copy link

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

….decode('utf8')

which is a strict mode.

base64 values should be decoded with proper encodings
@risperdal
Copy link
Author

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
Copy link
Author

should solve issue #110

@ryanpcmcquen
Copy link

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:
sublimehq/package_control_channel#7658

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants