aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-09-06 17:54:30 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-09-06 17:54:30 +0200
commit34066eec642ba8a5b88fd3a722ff42d78529e3f4 (patch)
tree413ccd06e856c1ad339a7cba36bd786f286e6ddd
parent98924a7fa1cae390f30d6daf4fcfd05cbfd80ffe (diff)
downloadmblaze-34066eec642ba8a5b88fd3a722ff42d78529e3f4.tar.gz
contrib: add mrecode
-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