Skip to content

?\u3042"" produces a broken string on non-UTF-8 input #3512

@qnighy

Description

@qnighy
# encoding: Windows-31J
p ?\u3042""
% ruby --parser=parse.y test.rb
"あ"
% ruby --parser=prism test.rb
"\x{E381}\x82"

Note that U+3042 is represented as \xE3\x81\x82 in UTF-8 and \x82\xA0 in Windows-31J.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions