From: Jarkko Hietaniemi Date: Tue, 21 Jan 2003 14:18:40 +0000 (+0000) Subject: Allow explicit -C enable/disable by -C:1/-C:0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=672fde27ba83048a1bcb79269f93917843058281;p=p5sagit%2Fp5-mst-13.2.git Allow explicit -C enable/disable by -C:1/-C:0 (suggested by Peter Haworth). p4raw-id: //depot/perl@18536 --- diff --git a/perl.c b/perl.c index 0abde46..6c2c366 100644 --- a/perl.c +++ b/perl.c @@ -2156,6 +2156,10 @@ Perl_moreswitches(pTHX_ char *s) case 'C': PL_wantutf8 = TRUE; /* Can be set earlier by $ENV{PERL_UTF8_LOCALE}. */ s++; + if (*s == ':') { + PL_wantutf8 = (bool) atoi(s + 1); + for (s++; isDIGIT(*s); s++) ; + } return s; case 'F': PL_minus_F = TRUE; diff --git a/pod/perlrun.pod b/pod/perlrun.pod index 46e1849..9622b4d 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -4,7 +4,7 @@ perlrun - how to execute the Perl interpreter =head1 SYNOPSIS -B S<[ B<-CsTtuUWX> ]> +B S<[ B<-sTtuUWX> ]> S<[ B<-hv> ] [ B<-V>[:I] ]> S<[ B<-cw> ] [ B<-d>[:I] ] [ B<-D>[I] ]> S<[ B<-pna> ] [ B<-F>I ] [ B<-l>[I] ] [ B<-0>[I] ]> @@ -14,6 +14,7 @@ B S<[ B<-CsTtuUWX> ]> S<[ B<-x>[I] ]> S<[ B<-i>[I] ]> S<[ B<-e> I<'command'> ] [ B<--> ] [ I ] [ I ]...> + S<[ B<-C[:I]> ]> =head1 DESCRIPTION @@ -264,9 +265,10 @@ is equivalent to An alternate delimiter may be specified using B<-F>. -=item B<-C> +=item B<-C[:boolean]> -enables Perl to use the Unicode APIs on the target system. +enables Perl to use the Unicode APIs on the target system. A bare C<-C> +enables, C<-C:1> also enables, and C<-C:0> disables. As of Perl 5.8.1, if C<-C> is used and the locale settings (the LC_ALL, LC_CTYPE, and LANG environment variables) indicate a UTF-8 locale,