Skip to content

Conversation

@FGasper
Copy link
Contributor

@FGasper FGasper commented Sep 7, 2022

No description provided.

This code:

    chr $u =~ /[[:^ascii:]]/

… processes the pattern-match first, then the chr. That means that
the overall result will either be "\0" or "\1", both of which Perl
regards as truthy. Thus, the “optimized” path never happens.
(This can be confirmed by putting a die() in the optimized path.)

This fixes that by using the $hex value computed just above.
@FGasper FGasper force-pushed the fix_unicode_escape_decode branch 2 times, most recently from 4f46cb3 to 4db1f9b Compare September 7, 2022 14:49
@charsbar
Copy link
Collaborator

charsbar commented Sep 7, 2022

@FGasper Thanks for the PR. The change is from https://github.com/makamaka/JSON-PP/pull/64/files#diff-8eae66db42fb29ffa131a180d7e8c9b771d4717c9877ba1fda72cfd3d923afbfL607-R620 . Unfortunately I am not accessible to an EBCDIC environment. Could you communicate with khwilliamson first to find what's the best way for both?

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