Repository navigation
Calling Intl.v8BreakIterator makes the process crash #3111
Description
Activity
- addedv8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.i18n-apiIssues and PRs related to Node.js internationalization support.Issues and PRs related to Node.js internationalization support.
on Sep 29, 2015 Yea, I'm seeing this also. It works when built with full-icu, but fails with small-icu
/cc @nodejs/intl
V8 wanted this to be a fatal instead of just a soft error (exception or
something. )Yes small Icu doesn't have the data needed for this undocumented feature.
Takes significant space- Use full Icu.If this is an important feature lets get it added to ecma402
El martes, 29 de septiembre de 2015, Ben Noordhuis notifications@github.com
escribió:/cc @nodejs/intl https://github.com/orgs/nodejs/teams/intl
—
Reply to this email directly or view it on GitHub
#3111 (comment).Should we "delete" the
Intl.v8BreakIteratorproperty if we know at startup that it can't function? Thoughts anyone?Does anyone know what
Intl.v8BreakIteratordoes?Maybe @ajklein knows more about this method.
@nciric would know much better than I (this is the best I could find: https://code.google.com/p/v8-i18n/wiki/BreakIterator).
Break iterator does character/sentence segmentation in a locale friendly way. It relies on largish data files, and that's one of the reasons we added it to the Intl.* for Chrome/V8. Intl.v8BreakIterator is not part of ECMA 402 spec.
Feel free to remove support for it from node. V8 may needed it for some internal projects.
Should we "delete" the
Intl.v8BreakIteratorproperty if we know at startup that it can't function? Thoughts anyone?Nah just make it throw.
OK. Current thought:
- if the user sets a data path using env var or parameter (or in detect "full-icu" module #3460 full ICU is detected) , set
process.icu_data_dirto that data path innode.cc - in
node.js:
if (process.config.variables.icu_small && !process.icu_data_dir) { Intl.v8BreakIterator=function(){throw Error('Data not available…');} }- if the user sets a data path using env var or parameter (or in detect "full-icu" module #3460 full ICU is detected) , set
Does node exposes any other v8 specific functionality? I'm worry about portability of the code if you use
v8BreakIterator().@caridy no, nothing like that is exposed.
14 remaining items
- added a commit that references this issue
on May 3, 2016 $ node -p "new Intl.v8BreakIterator()" {}- added a commit that references this issue
on May 17, 2016 - added 2 commits that reference this issue
on Oct 10, 2016 - added a commit that references this issue
on Oct 18, 2016 - added a commit that references this issue
on Oct 26, 2016 - added a commit that references this issue
on Jul 27, 2026
This is the line where it happens:
node/deps/v8/src/i18n.cc
Line 914 in 64beab0
I guess that the feature v8 is trying to load is not available with
small-icu? Anyway it seems wrong to experience a fatal error in this case.