Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base64 values should be decoded with proper encodings #150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

base64 values should be decoded with proper encodings #150

wants to merge 2 commits into from

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:
wbond/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