summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-04 13:53:16 +0000
committerGisle Aas <gisle@activestate.com>2006-01-04 13:53:16 +0000
commit6a245ed1e7ef6f728779f8328fb52e42b1aa0b8c (patch)
tree2b22d2ba828e88be62274986b1e187fcf3861313 /locale.c
parent359e8da2ef248b0ae5eba7c150226268a764452f (diff)
downloadperl-6a245ed1e7ef6f728779f8328fb52e42b1aa0b8c.tar.gz
Get rid of a few more hardcoded string lengths.
p4raw-id: //depot/perl@26645
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/locale.c b/locale.c
index 881ebd9431..567a97aba0 100644
--- a/locale.c
+++ b/locale.c
@@ -499,23 +499,23 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
codeset = nl_langinfo(CODESET);
#endif
if (codeset)
- utf8locale = (ibcmp(codeset, "UTF-8", 5) == 0 ||
- ibcmp(codeset, "UTF8", 4) == 0);
+ utf8locale = (ibcmp(codeset, STR_WITH_LEN("UTF-8")) == 0 ||
+ ibcmp(codeset, STR_WITH_LEN("UTF8") ) == 0);
#if defined(USE_LOCALE)
else { /* nl_langinfo(CODESET) is supposed to correctly
* interpret the locale environment variables,
* but just in case it fails, let's do this manually. */
if (lang)
- utf8locale = (ibcmp(lang, "UTF-8", 5) == 0 ||
- ibcmp(lang, "UTF8", 4) == 0);
+ utf8locale = (ibcmp(lang, STR_WITH_LEN("UTF-8")) == 0 ||
+ ibcmp(lang, STR_WITH_LEN("UTF8") ) == 0);
#ifdef USE_LOCALE_CTYPE
if (curctype)
- utf8locale = (ibcmp(curctype, "UTF-8", 5) == 0 ||
- ibcmp(curctype, "UTF8", 4) == 0);
+ utf8locale = (ibcmp(curctype, STR_WITH_LEN("UTF-8")) == 0 ||
+ ibcmp(curctype, STR_WITH_LEN("UTF8") ) == 0);
#endif
if (lc_all)
- utf8locale = (ibcmp(lc_all, "UTF-8", 5) == 0 ||
- ibcmp(lc_all, "UTF8", 4) == 0);
+ utf8locale = (ibcmp(lc_all, STR_WITH_LEN("UTF-8")) == 0 ||
+ ibcmp(lc_all, STR_WITH_LEN("UTF8") ) == 0);
}
#endif /* USE_LOCALE */
if (utf8locale)