readline: use icu based string width calculation
Rather than the pseudo-wcwidth impl used currently, use the ICU character properties database to calculate string width and determine if a character is full width or not. This allows the algorithm to correctly identify emoji's as full width, ensures the algorithm will continue to fucntion properly as new unicode codepoints are added, and it's faster. This was originally part of a proposal to add a new unicode module, but has been split out. Refs: https://github.com/nodejs/node/pull/8075 PR-URL: https://github.com/nodejs/node/pull/9040 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Steven R Loomis <srloomis@us.ibm.com>
parent
52670fc0
Please register or sign in to comment