Some v8 changes to support i18n

19 views
Skip to first unread message

Steven R. Loomis (IBM)

unread,
Jun 2, 2014, 6:45:44 PM6/2/14
to v8-...@googlegroups.com
Hello,
I would like to contribute some changes to support i18n use.
I work on ICU at IBM, and it's my understanding that there is a CCLA sent in already.

For background, I am working on trying to get ICU on by default in Node. https://github.com/joyent/node/pull/7719

I've opened three bugs:

* https://code.google.com/p/v8/issues/detail?id=3345 -  Make breakiterator optional. This detects whether break iteration is turned off in the ICU you are built against.
  Saves ~1MB of code (not counting data).

* https://code.google.com/p/v8/issues/detail?id=3348 - bug fixes
 This does some error checking if ICU wasn't able to load its data.
  This isn't a complete fix, but turns crashers (SEGV) into "soft" errors (node exits with an error message).

And the more complicated one..
* https://code.google.com/p/v8/issues/detail?id=3344 - InitializeICUDirectory
  This just sets u_setDataDirectory() to tell ICU where to load its data, or if the param is null, it sets a "small" built in data pack, just en+root  and calls u_setCommonData()..

 An alternate model could be to just have two new APIs:
  InitializeICUDirectory( path .. )
  InitializeICUData( void *data .. )
The existing function, InitializeICU( const char *file ) could be kept, no conflict there. Just document to call only one of the functions.

* As to building ICU itself, I have some new gyp+bash code, which might be better gyp+python, but have not disturbed at all how v8 builds against chromium's ICU.

 
Please let me know how best to proceed.
Regards,
Steven

joc...@chromium.org

unread,
Jun 3, 2014, 4:09:00 AM6/3/14
to v8-...@googlegroups.com, v8-u...@googlegroups.com
+v8-users, v8-dev is mostly for codereviews and stuff...


On Tuesday, June 3, 2014 12:45:44 AM UTC+2, Steven R. Loomis (IBM) wrote:
Hello,
I would like to contribute some changes to support i18n use.
I work on ICU at IBM, and it's my understanding that there is a CCLA sent in already.

Yes, indeed!
 

For background, I am working on trying to get ICU on by default in Node. https://github.com/joyent/node/pull/7719

Cool!
 


I've opened three bugs:

Thank you, I cc'd some folks and added comments to them
 

* https://code.google.com/p/v8/issues/detail?id=3345 -  Make breakiterator optional. This detects whether break iteration is turned off in the ICU you are built against.
  Saves ~1MB of code (not counting data).

* https://code.google.com/p/v8/issues/detail?id=3348 - bug fixes
 This does some error checking if ICU wasn't able to load its data.
  This isn't a complete fix, but turns crashers (SEGV) into "soft" errors (node exits with an error message).

And the more complicated one..
* https://code.google.com/p/v8/issues/detail?id=3344 - InitializeICUDirectory
  This just sets u_setDataDirectory() to tell ICU where to load its data, or if the param is null, it sets a "small" built in data pack, just en+root  and calls u_setCommonData()..

 An alternate model could be to just have two new APIs:
  InitializeICUDirectory( path .. )
  InitializeICUData( void *data .. )
The existing function, InitializeICU( const char *file ) could be kept, no conflict there. Just document to call only one of the functions.

* As to building ICU itself, I have some new gyp+bash code, which might be better gyp+python, but have not disturbed at all how v8 builds against chromium's ICU.


We're directly using chromium's ICU, however, it's possible to also use the system's ICU library or your own version.

best
-jochen

Steven R. Loomis (IBM)

unread,
Jun 3, 2014, 11:47:39 AM6/3/14
to v8-u...@googlegroups.com, v8-...@googlegroups.com
El martes, 3 de junio de 2014 01:09:03 UTC-7, joc...@chromium.org escribió:
+v8-users, v8-dev is mostly for codereviews and stuff...

OK, thanks.
 
On Tuesday, June 3, 2014 12:45:44 AM UTC+2, Steven R. Loomis (IBM) wrote:
Hello,
I would like to contribute some changes to support i18n use.
I work on ICU at IBM, and it's my understanding that there is a CCLA sent in already.

Yes, indeed!
 

For background, I am working on trying to get ICU on by default in Node. https://github.com/joyent/node/pull/7719

Cool!
 


I've opened three bugs:

Thank you, I cc'd some folks and added comments to them
Thanks. We can continue the discussion on the specific bugs. 


* https://code.google.com/p/v8/issues/detail?id=3345 -  Make breakiterator optional. This detects whether break iteration is turned off in the ICU you are built against.
  Saves ~1MB of code (not counting data).

* https://code.google.com/p/v8/issues/detail?id=3348 - bug fixes
 This does some error checking if ICU wasn't able to load its data.
  This isn't a complete fix, but turns crashers (SEGV) into "soft" errors (node exits with an error message).

And the more complicated one..
* https://code.google.com/p/v8/issues/detail?id=3344 - InitializeICUDirectory
  This just sets u_setDataDirectory() to tell ICU where to load its data, or if the param is null, it sets a "small" built in data pack, just en+root  and calls u_setCommonData()..

 An alternate model could be to just have two new APIs:
  InitializeICUDirectory( path .. )
  InitializeICUData( void *data .. )
The existing function, InitializeICU( const char *file ) could be kept, no conflict there. Just document to call only one of the functions.

* As to building ICU itself, I have some new gyp+bash code, which might be better gyp+python, but have not disturbed at all how v8 builds against chromium's ICU.


We're directly using chromium's ICU, however, it's possible to also use the system's ICU library or your own version.

Right... I'd like some more flexibility in how ICU is built. But, I can do that by specifying a new .gyp file instead of the chromium one.  That may be an area the wiki could specify in some more detail (I'd be glad to suggest text)
 
Reply all
Reply to author
Forward
0 new messages