There is a mismatch between isblank() used by tr and c32isblank() now
used by uniq on Solaris 11 OpenIndiana. isblank() was seen to return
true for non breaking space, while c32isblank() returned false.
Interestingly on Solaris, non breaking space is considered a blank
character, and isblank() and c32isblank() honor this in all locales.
* tests/uniq/uniq.pl: Adjust the blank check to use join(1) rather than
tr(1), as join uses the same blank determination routines as uniq(1).
{
# I've only ever triggered the problem in a non-C locale.
- # See if isblank returns true for nbsp.
- my $x = qx!env printf '\xa0'| LC_ALL=$locale tr '[:blank:]' x!;
+ # See if nbsp is considered a blank character
+ my $x = qx!env printf 'x\xa0y'| LC_ALL=$locale join -a2 -o2.1 /dev/null -!;
+ chomp $x;
# If so, expect just one line of output in the schar test.
# Otherwise, expect two.
my $in = " y z\n\xa0 y z\n";