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

SvPV bug #23

Closed
FGasper opened this issue Aug 27, 2021 · 1 comment
Closed

SvPV bug #23

FGasper opened this issue Aug 27, 2021 · 1 comment

Comments

@FGasper
Copy link
Contributor

FGasper commented Aug 27, 2021

These should output the same:

> perl -MData::Dumper -MJavaScript::Duktape::XS -e'my $s = "é"; my $js = JavaScript::Duktape::XS->new(); $js->set(mystr => $s); print Dumper $js->eval(q<mystr>)'
$VAR1 = "\x{e9}";
> perl -MData::Dumper -MJavaScript::Duktape::XS -e'my $s = "é"; utf8::upgrade($s); my $js = JavaScript::Duktape::XS->new(); $js->set(mystr => $s); print Dumper $js->eval(q<mystr>)'
$VAR1 = "\x{c3}\x{a9}";

… but they don’t.

Something appears to be reading the raw PV rather than using SvPVbyte.

FGasper added a commit to FGasper/JavaScript-Duktape-XS that referenced this issue Aug 27, 2021
Issue gonzus#23: This makes this module’s behaviour more uniform so callers
don’t need to worry about Perl internals.
FGasper added a commit to FGasper/JavaScript-Duktape-XS that referenced this issue Aug 27, 2021
Issue gonzus#23: This makes this module’s behaviour more uniform so callers
don’t need to worry about Perl internals.
@gonzus
Copy link
Owner

gonzus commented Aug 31, 2021

Closing this issue after the merge. Thanks!

@gonzus gonzus closed this as completed Aug 31, 2021
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

No branches or pull requests

2 participants