From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13445 invoked by alias); 4 Mar 2015 16:57:11 -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: 34642 Received: (qmail 15952 invoked from network); 4 Mar 2015 16:57:09 -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.3 \(1878.6\)) Subject: Re: [PATCH] fix failure of D07multibyte on Mac OS X From: "Jun T." In-Reply-To: Date: Thu, 5 Mar 2015 01:57:06 +0900 Content-Transfer-Encoding: 7bit Message-Id: References: To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.1878.6) X-Biglobe-Spnum: 57814 I've pushed the patch with the following modification. diff --git a/Src/compat.c b/Src/compat.c index 21e2a5e..09b3d6a 100644 --- a/Src/compat.c +++ b/Src/compat.c @@ -958,8 +958,7 @@ int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) int isprint_ascii(int c) { - char *locale = setlocale(LC_CTYPE, NULL); - if (strcasestr(locale, "utf-8") || strcasestr(locale, "utf8")) + if (!strcmp(nl_langinfo(CODESET), "UTF-8")) return (c >= 0x20 && c <= 0x7e); else return isprint(c);