From a3fee2abd19ed0aedebc0f3949fb969f2ce7836e Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sat, 16 Aug 2014 21:27:58 +0100 Subject: memusg, to_ascii --- to_ascii | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 to_ascii (limited to 'to_ascii') 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 + -- cgit v1.2.3