Commit c239cc65 authored by Anna Henningsen's avatar Anna Henningsen Committed by Ruben Bridgewater
Browse files

util,readline: NFC-normalize strings before getStringWidth

The assumption here is that decomposed characters render like their
composed character equivalents, and that working with the former
comes with a risk of over-estimating string widths given that
we compute them on a per-code-point basis. The regression test
added here (한글 vs 한글) is an example of that happening.

PR-URL: https://github.com/nodejs/node/pull/33052


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarAnto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 0f4d5138
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment