Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 2009 11:48:53 -0700
From:      Juli Mallett <juli@clockworksquid.com>
To:        freebsd-standards@freebsd.org
Subject:   Shouldn't cat(1) use the C locale?
Message-ID:  <eaa228be0904301148r798e0350k7653aa2d9c3e3dd6@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eaa228be0904301148r798e0350k7653aa2d9c3e3dd6>