From owner-freebsd-standards@FreeBSD.ORG Thu Apr 30 19:22:23 2009 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0127A106566B for ; Thu, 30 Apr 2009 19:22:23 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id B0CCA8FC1C for ; Thu, 30 Apr 2009 19:22:22 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: by yw-out-2324.google.com with SMTP id 9so1228682ywe.13 for ; Thu, 30 Apr 2009 12:22:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.25.11 with SMTP id 11mr533073agy.18.1241117354685; Thu, 30 Apr 2009 11:49:14 -0700 (PDT) From: Juli Mallett Date: Thu, 30 Apr 2009 11:48:53 -0700 Message-ID: To: freebsd-standards@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Shouldn't cat(1) use the C locale? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 19:22:23 -0000 Hey folks, The cat manpage suggests that the infamous, non-standard -v extension is ASCII-oriented but cat(1) these days uses isprint and pals and calls setlocale(LC_CTYPE, ""), which for those of us with dodgy environments (mine includes LC_ALL=en_US.UTF-8), means that "cat -v" behaves radically-differently to the manual page describes. Does anyone see any reason for our extensions, etc., to work with LC_CTYPE != C? It doesn't make a lot of sense to me. I'd like to change it if there's not a good reason to keep it broken this way, like: - setlocale(LC_CTYPE, ""); + setlocale(LC_CTYPE, "C"); Thoughts, etc.? Juli.