}
# NB 13.04.18: TODO
-# NB 13.04.18 file_to_utf8() {
-# NB 13.04.18 local usage="file_to_utf8 [FILES|DIRS]"
-# NB 13.04.18 find $@ -type f | while read file; do
-# NB 13.04.18 enc=$(file --mime-encoding "$file" | sed 's/^.*\? \([^ ]\+\)$/\1/' | awk '{print tolower($0)}')
-# NB 13.04.18 #file --mime-encoding "$file"
-# NB 13.04.18 printf '%s : ' "$file"
-# NB 13.04.18 iconv -f "$enc" -t utf-8 "$file" | wc -c
-# NB 13.04.18 done
-# NB 13.04.18 }
+file_to_utf8() {
+ local usage="file_to_utf8 [FILES|DIRS]"
+ find $@ -type f | while read file; do
+ enc=$(file --mime-encoding "$file" | sed 's/^.*\? \([^ ]\+\)$/\1/' | awk '{print tolower($0)}')
+ case "$enc" in
+ iso*) [ 1 ] ;;
+ *) continue;
+ esac
+ #file --mime-encoding "$file"
+ printf '%s : %s : ' "$enc" "$file"
+ iconv -f "$enc" -t utf-8 "$file" | wc -c
+ done
+}
file_user() {
ls -dl "$1" | awk '{print $3}'