/* tr -- a filter to translate characters
- Copyright (C) 91, 95, 96, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 91, 95, 96, 1997, 1998, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
validate (s1, s2);
+ /* Use binary I/O, since `tr' is sometimes used to transliterate
+ non-printable characters, or characters which are stripped away
+ by text-mode reads (like CR and ^Z). */
+ SET_BINARY2 (STDIN_FILENO, STDOUT_FILENO);
+
if (squeeze_repeats && non_option_args == 1)
{
set_initialize (s1, complement, in_squeeze_set);