Shouldn't cat(1) use the C locale?

Juli Mallett juli at
Thu Apr 30 19:22:23 UTC 2009

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,

-	setlocale(LC_CTYPE, "");
+	setlocale(LC_CTYPE, "C");

Thoughts, etc.?


More information about the freebsd-standards mailing list