diff options
author | Steven R. Loomis <srloomis@us.ibm.com> | 2019-09-30 21:17:49 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-04 01:21:26 +0300 |
commit | 1a25e901b7c380929f0d08599f49dd77897a627f (patch) | |
tree | 3fdac9d1df5970cf8870bf5a9a5ae1cb45fa890a /doc/api/intl.md | |
parent | a71fb978a40b5251fdb012bab5e03598d5397a10 (diff) |
tools: support full-icu by default
Instead of an English-only icudt64l.dat in the repo,
we now have icudt64l.dat.gz with all locales.
- updated READMEs and docs
- shrinker now copies source, and compresses (bzip2) the ICU data file
- configure expects deps/icu-small to be full ICU with a full
compressed data file
Fixes: https://github.com/nodejs/node/issues/19214
Co-Authored-By: Richard Lau <riclau@uk.ibm.com>
Co-Authored-By: Jan Olaf Krems <jan.krems@gmail.com>
Co-Authored-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/29522
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'doc/api/intl.md')
-rw-r--r-- | doc/api/intl.md | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/doc/api/intl.md b/doc/api/intl.md index be30e4e2528..35124474067 100644 --- a/doc/api/intl.md +++ b/doc/api/intl.md @@ -23,11 +23,9 @@ programs. Some of them are: * [`RegExp` Unicode Property Escapes][] Node.js (and its underlying V8 engine) uses [ICU][] to implement these features -in native C/C++ code. However, some of them require a very large ICU data file -in order to support all locales of the world. Because it is expected that most -Node.js users will make use of only a small portion of ICU functionality, only -a subset of the full ICU data set is provided by Node.js by default. Several -options are provided for customizing and expanding the ICU data set either when +in native C/C++ code. The full ICU data set is provided by Node.js by default. +However, due to the size of the ICU data file, several +options are provided for customizing the ICU data set either when building or running Node.js. ## Options for building Node.js @@ -38,8 +36,8 @@ in [BUILDING.md][]. * `--with-intl=none`/`--without-intl` * `--with-intl=system-icu` -* `--with-intl=small-icu` (default) -* `--with-intl=full-icu` +* `--with-intl=small-icu` +* `--with-intl=full-icu` (default) An overview of available Node.js and JavaScript features for each `configure` option: @@ -66,8 +64,8 @@ operation is identical to that of `Date.prototype.toString()`. ### Disable all internationalization features (`none`) -If this option is chosen, most internationalization features mentioned above -will be **unavailable** in the resulting `node` binary. +If this option is chosen, ICU is disabled and most internationalization +features mentioned above will be **unavailable** in the resulting `node` binary. ### Build with a pre-installed ICU (`system-icu`) @@ -106,9 +104,7 @@ console.log(spanish.format(january)); // Should print "enero" ``` -This mode provides a good balance between features and binary size, and it is -the default behavior if no `--with-intl` flag is passed. The official binaries -are also built in this mode. +This mode provides a balance between features and binary size. #### Providing ICU data at runtime @@ -149,8 +145,9 @@ enable full `Intl` support. This option makes the resulting binary link against ICU statically and include a full set of ICU data. A binary created this way has no further external -dependencies and supports all locales, but might be rather large. See -[BUILDING.md][BUILDING.md#full-icu] on how to compile a binary using this mode. +dependencies and supports all locales, but might be rather large. This is +the default behavior if no `--with-intl` flag is passed. The official binaries +are also built in this mode. ## Detecting internationalization support @@ -205,7 +202,6 @@ to be helpful: [`String.prototype.toUpperCase()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase [`require('buffer').transcode()`]: buffer.html#buffer_buffer_transcode_source_fromenc_toenc [`require('util').TextDecoder`]: util.html#util_class_util_textdecoder -[BUILDING.md#full-icu]: https://github.com/nodejs/node/blob/master/BUILDING.md#build-with-full-icu-support-all-locales-supported-by-icu [BUILDING.md]: https://github.com/nodejs/node/blob/master/BUILDING.md [ECMA-262]: https://tc39.github.io/ecma262/ [ECMA-402]: https://tc39.github.io/ecma402/ |