sh: Add UTF-8 support to ${#var}.
[dragonfly.git] / tools / regression / bin / sh / expansion / length8.0
1 # $FreeBSD: src/tools/regression/bin/sh/expansion/length8.0,v 1.1 2011/05/07 14:32:16 jilles Exp $
2
3 unset LC_ALL
4 LC_CTYPE=en_US.ISO8859-1
5 export LC_CTYPE
6
7 # a umlaut
8 s=$(printf '\303\244')
9 # euro sign
10 s=$s$(printf '\342\202\254')
11 # some sort of 't' outside BMP
12 s=$s$(printf '\360\235\225\245')
13 set -- "$s"
14 [ ${#s} = 9 ] && [ ${#1} = 9 ]