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

Android V8 does'n support \p Regexp. #17006

Open
smallmain opened this issue May 17, 2024 · 5 comments
Open

Android V8 does'n support \p Regexp. #17006

smallmain opened this issue May 17, 2024 · 5 comments
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@smallmain
Copy link

Cocos Creator version

3.8.2

System information

MacOS

Issue description

It may be related to this: https://nodejs.org/dist/latest-v17.x/docs/api/intl.html#internationalization-support

image

Relevant error log output

No response

Steps to reproduce

.

Minimal reproduction project

No response

@smallmain smallmain added Bug Needs Triage Needs to be assigned by the team labels May 17, 2024
@minggo
Copy link
Contributor

minggo commented May 24, 2024

It may be related to this: https://nodejs.org/dist/latest-v17.x/docs/api/intl.html#internationalization-support

I don't understand why regular expression is related to internationalization.

@smallmain
Copy link
Author

smallmain commented May 24, 2024

它可能与此相关:https://nodejs.org/dist/latest-v17.x/docs/api/intl.html#internationalization-support

我不明白为什么正则表达式与国际化相关。

image

Since RegExp Unicode Property Escapes are matched in a language-aware way, which requires ICU data (International Components for Unicode), which can be optionally included in NodeJS builds, So I suspect that Cocos' V8 builds don't include this data, since it works fine on other platforms.

https://github.com/tc39/proposal-regexp-unicode-property-escapes

And, theoretically, all the functions listed in the table should not work in their entirety without including this data.

@minggo
Copy link
Contributor

minggo commented May 24, 2024

Got it, thanks.

Yep, the ICU module is not included in v8 to reduce size. We will take a look how to provide it.

@smallmain
Copy link
Author

Got it, thanks.

Yep, the ICU module is not included in v8 to reduce size. We will take a look how to provide it.

RegExp's Unicode support is very important. If you want to correctly segment Chinese words, Emoji, etc., this is the simplest and most correct method. If the engine does not support it, the user also needs to increase the size of the polyfill.

Hope it gets taken seriously.

@minggo
Copy link
Contributor

minggo commented May 24, 2024

Sure, we will resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants