diff options
author | Patrick Simianer <p@simianer.de> | 2014-08-16 21:27:58 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-08-16 21:27:58 +0100 |
commit | a3fee2abd19ed0aedebc0f3949fb969f2ce7836e (patch) | |
tree | 47b36fa96b5f2c85f49c92e3bd8f53010cf059a4 /to_ascii | |
parent | bad18ebfd358e4352643831040e45ad5435eff48 (diff) |
memusg, to_ascii
Diffstat (limited to 'to_ascii')
-rwxr-xr-x | to_ascii | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/to_ascii b/to_ascii new file mode 100755 index 0000000..6c1d23e --- /dev/null +++ b/to_ascii @@ -0,0 +1,13 @@ +#!/usr/bin/env ruby + + +while line = STDIN.gets + encoding_options = { + :invalid => :replace, + :undef => :replace, + :replace => '?', + :universal_newline => true + } + puts line.encode 'ASCII', encoding_options +end + |