The locale en_US.UTF-8 has varying and wrong definitions depending on
manufacturer. Using the portable C locale works just as well for the
purposes of these tests.
}
SKIP: {
- my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, 'en_US.UTF-8' );
- if ( !$current_locale || $current_locale ne 'en_US.UTF-8' ) {
- skip( 'cannot use locale en_US.UTF-8', 3 );
+ my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, 'C' );
+ if ( !$current_locale || $current_locale ne 'C' ) {
+ skip( 'cannot set locale C', 3 );
}
$check = $text =~ /(?u)\w/;