summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSteven R. Loomis <srloomis@us.ibm.com>2019-09-30 11:17:49 -0700
committerRich Trott <rtrott@gmail.com>2019-10-03 15:21:26 -0700
commit1a25e901b7c380929f0d08599f49dd77897a627f (patch)
tree3fdac9d1df5970cf8870bf5a9a5ae1cb45fa890a /doc
parenta71fb978a40b5251fdb012bab5e03598d5397a10 (diff)
downloadandroid-node-v8-1a25e901b7c380929f0d08599f49dd77897a627f.tar.gz
android-node-v8-1a25e901b7c380929f0d08599f49dd77897a627f.tar.bz2
android-node-v8-1a25e901b7c380929f0d08599f49dd77897a627f.zip
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')
-rw-r--r--doc/api/intl.md26
-rw-r--r--doc/api/util.md42
2 files changed, 31 insertions, 37 deletions
diff --git a/doc/api/intl.md b/doc/api/intl.md
index be30e4e252..3512447406 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/
diff --git a/doc/api/util.md b/doc/api/util.md
index 7fcb595dcd..118c2a4d0d 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -932,26 +932,9 @@ Per the [WHATWG Encoding Standard][], the encodings supported by the
one or more aliases may be used.
Different Node.js build configurations support different sets of encodings.
-While a very basic set of encodings is supported even on Node.js builds without
-ICU enabled, support for some encodings is provided only when Node.js is built
-with ICU and using the full ICU data (see [Internationalization][]).
+(see [Internationalization][])
-#### Encodings Supported Without ICU
-
-| Encoding | Aliases |
-| ----------- | --------------------------------- |
-| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` |
-| `'utf-16le'` | `'utf-16'` |
-
-#### Encodings Supported by Default (With ICU)
-
-| Encoding | Aliases |
-| ----------- | --------------------------------- |
-| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` |
-| `'utf-16le'` | `'utf-16'` |
-| `'utf-16be'` | |
-
-#### Encodings Requiring Full ICU Data
+#### Encodings Supported by Default (With Full ICU Data)
| Encoding | Aliases |
| ----------------- | -------------------------------- |
@@ -990,6 +973,21 @@ with ICU and using the full ICU data (see [Internationalization][]).
| `'shift_jis'` | `'csshiftjis'`, `'ms932'`, `'ms_kanji'`, `'shift-jis'`, `'sjis'`, `'windows-31j'`, `'x-sjis'` |
| `'euc-kr'` | `'cseuckr'`, `'csksc56011987'`, `'iso-ir-149'`, `'korean'`, `'ks_c_5601-1987'`, `'ks_c_5601-1989'`, `'ksc5601'`, `'ksc_5601'`, `'windows-949'` |
+#### Encodings Supported when Node.js is built with the `small-icu` option
+
+| Encoding | Aliases |
+| ----------- | --------------------------------- |
+| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` |
+| `'utf-16le'` | `'utf-16'` |
+| `'utf-16be'` | |
+
+#### Encodings Supported when ICU is disabled
+
+| Encoding | Aliases |
+| ----------- | --------------------------------- |
+| `'utf-8'` | `'unicode-1-1-utf-8'`, `'utf8'` |
+| `'utf-16le'` | `'utf-16'` |
+
The `'iso-8859-16'` encoding listed in the [WHATWG Encoding Standard][]
is not supported.
@@ -1005,9 +1003,9 @@ changes:
* `encoding` {string} Identifies the `encoding` that this `TextDecoder` instance
supports. **Default:** `'utf-8'`.
* `options` {Object}
- * `fatal` {boolean} `true` if decoding failures are fatal. This option is only
- supported when ICU is enabled (see [Internationalization][]). **Default:**
- `false`.
+ * `fatal` {boolean} `true` if decoding failures are fatal.
+ This option is not supported when ICU is disabled
+ (see [Internationalization][]). **Default:** `false`.
* `ignoreBOM` {boolean} When `true`, the `TextDecoder` will include the byte
order mark in the decoded result. When `false`, the byte order mark will
be removed from the output. This option is only used when `encoding` is