Giter Club home page Giter Club logo

Comments (5)

minggo avatar minggo commented on June 16, 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.

from cocos-engine.

smallmain avatar smallmain commented on June 16, 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.

from cocos-engine.

minggo avatar minggo commented on June 16, 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.

from cocos-engine.

smallmain avatar smallmain commented on June 16, 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.

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.

from cocos-engine.

minggo avatar minggo commented on June 16, 2024

Sure, we will resolve it.

from cocos-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.