summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-01-24 13:58:13 -0700
committerKarl Williamson <public@khwilliamson.com>2014-01-27 11:07:17 -0700
commitab8b8bcc40d19dff876113a726b395e07ceb3313 (patch)
tree04b17d22291aeca0d440c5b2999965d8b3784aba /lib
parentb373396993794bd428d71821e0a3f89d22a2ccb0 (diff)
downloadperl-ab8b8bcc40d19dff876113a726b395e07ceb3313.tar.gz
Move more locale code to t/loc_tools.pl
This trivial code to determine if a locale is a utf8 one or not is currently used in just one place, but future commits will use it in others, and will make it non-trivial, and non-obvious.
Diffstat (limited to 'lib')
-rw-r--r--lib/locale.t4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/locale.t b/lib/locale.t
index 43e660fe20..3180a69833 100644
--- a/lib/locale.t
+++ b/lib/locale.t
@@ -606,14 +606,12 @@ foreach my $Locale (@Locale) {
# documented deficiencies. Non- UTF-8 locales are tested only under plain
# 'use locale', as otherwise we would have to convert everything in them
# to Unicode.
- # The locale name doesn't necessarily have to have "utf8" in it to be a
- # UTF-8 locale, but it works mostly.
- my $is_utf8_locale = $Locale =~ /UTF-?8/i;
my %UPPER = (); # All alpha X for which uc(X) == X and lc(X) != X
my %lower = (); # All alpha X for which lc(X) == X and uc(X) != X
my %BoThCaSe = (); # All alpha X for which uc(X) == lc(X) == X
+ my $is_utf8_locale = is_locale_utf8($Locale);
if (! $is_utf8_locale) {
use locale;
@{$posixes{'word'}} = grep /\w/, map { chr } 0..255;