about summary refs log tree commit diff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/mrecode8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/mrecode b/contrib/mrecode
new file mode 100755
index 0000000..45a00a7
--- /dev/null
+++ b/contrib/mrecode
@@ -0,0 +1,8 @@
+#!/bin/sh
+# mrecode - recode stdin respecting PIPE_CHARSET into UTF-8
+
+if [ -n "$PIPE_CHARSET" ]; then
+	exec iconv -f "$PIPE_CHARSET" -t UTF-8
+else
+	exec cat
+fi