使用预装的 ICU 构建(system-icu)
Node.js 可以链接到系统上已安装的 ICU。 事实上,大多数 Linux 发行版已经安装了 ICU,这个选项可以复用操作系统中其他组件使用的相同数据集。
system-icu
完全支持仅需要 ICU 库本身的功能,例如 String.prototype.normalize()
和 WHATWG 网址解析器。
另外需要 ICU 语言环境数据的特性,例如 Intl.DateTimeFormat
可能完全或部分支持,具体取决于系统上安装的 ICU 数据的完整性。
Node.js can link against an ICU build already installed on the system. In fact, most Linux distributions already come with ICU installed, and this option would make it possible to reuse the same set of data used by other components in the OS.
Functionalities that only require the ICU library itself, such as
String.prototype.normalize()
and the WHATWG URL parser, are fully
supported under system-icu
. Features that require ICU locale data in
addition, such as Intl.DateTimeFormat
may be fully or partially
supported, depending on the completeness of the ICU data installed on the
system.