diff options
Diffstat (limited to 'bsgrep')
-rwxr-xr-x | bsgrep | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -342,8 +342,9 @@ on standard error: bsgrep: <file>: stripping carriage returns The input file has MS-DOS/Windows CRLF line endings. B<bsgrep>'s -output will have these removed. Note that Unix-flavored tools that -understand continuation lines will generally fail when fed CRLF files. +output will have these removed. Note that other Unix-flavored tools +that understand continuation lines will generally fail when fed CRLF +files. bsgrep: <file>, line <line>: whitespace after continuation, malformed input? @@ -360,6 +361,14 @@ to continue onto, so this is almost certainly an error. The above warnings don't affect the exit status. +=head1 ENVIRONMENT + +B<bsgrep> doesn't define any environment variables of its own, but +it does pay attention to B<LANG>, B<LC_ALL>, and B<LC_CTYPE>. If any +of these contain the string I<UTF-8>, the input and output will be +read/written as Unicode, encoded as UTF-8. If the input turns out not +to be Unicode, it will be assumed ISO-8859-1, and converted to Unicode. + =head1 EXIT STATUS 0 if there were any matches, 1 if there were none, or 2 if there @@ -372,7 +381,7 @@ B<grep>'s exit status. B<bsgrep> doesn't detect binary files like B<grep> does. It can and will print them to your terminal instead of "binary file matches". -Not all b<grep> options are supported. Options that aren't implemented +Not all B<grep> options are supported. Options that aren't implemented but might be someday include B<--color>, B<-a>, B<-A>, B<-B>, B<-C>, B<-o>. I don't intend to implement every single option B<grep> has, there are too many of them. @@ -382,6 +391,13 @@ There are no long options other than B<--help> and B<--version>. B<bsgrep> does not comply with the POSIX (or any other) standard for B<grep>, and does not intend do. +Locale support isn't quite the same as B<grep>: in a UTF-8 locale, +if the input isn't plain ASCII or valid UTF-8, it will be treated +as ISO-8859-1, internally converted to Unicode, and output will be +UTF-8. This isn't intended; it's a side-effect of how Perl UTF-8 +filehandles work. In non-UTF-8 locales, things should work as +expected. I hope. + =head1 AUTHOR B<bsgrep> was written by B. Watson <urchlay@slackware.uk> and released |