DragonFly BSD
DragonFly commits List (threaded) for 2011-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: sh: Add UTF-8 support to ${#var}.


From: Peter Avalos <pavalos@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 21 Aug 2011 16:32:02 -0700 (PDT)

commit fd296645cf39f03871a074f874002400f2e9c8a9
Author: Peter Avalos <pavalos@dragonflybsd.org>
Date:   Sat Jul 2 16:31:33 2011 -1000

    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

Summary of changes:
 bin/sh/expand.c                             |   18 ++++++++++++++----
 tools/regression/bin/sh/expansion/length7.0 |   14 ++++++++++++++
 tools/regression/bin/sh/expansion/length8.0 |   14 ++++++++++++++
 3 files changed, 42 insertions(+), 4 deletions(-)
 create mode 100644 tools/regression/bin/sh/expansion/length7.0
 create mode 100644 tools/regression/bin/sh/expansion/length8.0

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fd296645cf39f03871a074f874002400f2e9c8a9


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]