sh: Add UTF-8 support to ${#var}.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 3 Jul 2011 02:31:33 +0000 (16:31 -1000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 19:10:26 +0000 (12:10 -0700)
commitfd296645cf39f03871a074f874002400f2e9c8a9
tree0714c164971f02dcb311e47450bd798a5a9fbb58
parentbe4e801b0005adfe7453d3ffbf54c848f9eb52c7
sh: Add UTF-8 support to ${#var}.

If the current locale uses UTF-8, ${#var} counts codepoints (more
precisely, bytes b with (b & 0xc0) != 0x80).

Obtained-from:   FreeBSD SVN rev 221602
bin/sh/expand.c
tools/regression/bin/sh/expansion/length7.0 [new file with mode: 0644]
tools/regression/bin/sh/expansion/length8.0 [new file with mode: 0644]