From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5154 invoked by alias); 13 Nov 2013 14:35:42 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31971 Received: (qmail 585 invoked from network); 13 Nov 2013 14:35:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Biglobe-Sender: Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: [PATCH] helpfiles: Also accept 'UTF-8' as an encoding name. From: "Jun T." In-Reply-To: Date: Wed, 13 Nov 2013 22:30:02 +0900 Content-Transfer-Encoding: 7bit Message-Id: <35BD8D7E-01D5-469D-95DD-3030251D22AB@kba.biglobe.ne.jp> References: <20131110181333.7682d38f@pws-pc.ntlworld.com> <131110183043.ZM21795@torch.brasslantern.com> <131111084228.ZM26372@torch.brasslantern.com> <20131112101139.31d67b73@pwslap01u.europe.root.pri> To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.1822) --- Util/helpfiles | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Locale names may be either xx_YY.UTF8 or xx_YY.UTF-8. Also fixed a typo: lc_type --> lc_ctype diff --git a/Util/helpfiles b/Util/helpfiles index ba1c50a..3e3125e 100755 --- a/Util/helpfiles +++ b/Util/helpfiles @@ -56,11 +56,11 @@ sub Die { delete($ENV{'LC_ALL'}); $ENV{'LANG'} = 'C'; if($ARGV[0] =~ /-f(.*)/) { - $lc_type = $1; + $lc_ctype = $1; shift(@ARGV); &Usage() unless(@ARGV); - if($lc_type eq '') { - $lc_type = shift(@ARGV); + if($lc_ctype eq '') { + $lc_ctype = shift(@ARGV); &Usage() unless(@ARGV); } } else { @@ -68,10 +68,10 @@ if($ARGV[0] =~ /-f(.*)/) { $lc_ctype = ''; $choice = 0; while() { - if(/en.*utf8/i) { + if(/en.*utf-?8/i) { $lc_ctype = $_; last; - } elsif(/utf8/i) { + } elsif(/utf-?8/i) { $lc_ctype = $_; $choice = 2; } elsif(($choice < 1) && (/(en)|\./i)) { -- 1.8.3.4 (Apple Git-47)