Skip to content

RegExp unicode mode differs from V8 runtimes #18018

@kevgeoleo

Description

@kevgeoleo

What version of Bun is running?

1.2.4+fd9a5ea66

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

Hi,

I would like to report an issue I encountered in Bun while I was running the following code snippet:

var count = 0;
var r = /./gu;
r.lastIndex = 1;
console.log(r.exec("\ud800\udc00\ud801\udc01")[0]);  // Node and Deno: 𐀀, Bun: 𐐁

Regards,
Kevin

What is the expected behavior?

𐀀

What do you see instead?

𐐁

Additional information

No response

Metadata

Metadata

Assignees

Labels

jscRelated to an issue in JavaScriptCore

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions