about summary refs log tree commit diff
path: root/contrib/mrecode
blob: 69e97b4f2a48a05f0533866af1498c030d411afb (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh
# mrecode - recode stdin respecting PIPE_CHARSET into UTF-8

case "$PIPE_CHARSET" in
	''|*[Uu][Nn][Kk][Nn][Oo][Ww][Nn]*) exec cat;;
	*) exec iconv -f "$PIPE_CHARSET" -t UTF-8;;
esac