-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Comments
I don't understand why regular expression is related to internationalization. |
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. |
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. |
Sure, we will resolve it. |
I built the same v8 version used in cocos creator 3.8.3, its size will increase 4MB (zip packed in APK) or 10MB (so size, not packed). I think only some people need this functionality. So I don't suggest to include You could download the v8 with INTL support here ( https://github.com/cocos/v8/releases/tag/11.6.189.22-intl-support ) and replace the I will write a documentation about how to enable v8 INTL support. |
Can you add a option to build panel? |
It will be more work to do.
If there're many developers need this functionality, we will consider to add a radio button for easier switching v8 with or without INTL support. @minggo What's your opinion? |
I agree with @dumganhar . It may take more resource to add a new feature. Especially we should make every new feature work correctly on all platforms for every version. |
我们不是有扩展和实验室机制吗? 我们既然能通过扩展发布了 当然,这个 |
Extension and lab mechanism is used for the feature that we want to support but it is not ready. And we want to reduce it as few as possible.
We will support in when more developers need it. |
@dumganhar |
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
Relevant error log output
No response
Steps to reproduce
.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: