equal
deleted
inserted
replaced
1 #!/bin/sh |
1 #!/bin/sh |
2 echo "$1" |
2 echo "$1" |
3 mpg123 -vtn1 --long-tag "$1" 2>&1|awk '/^\t.*:/ {match($0,"\t(.*): +(.*)",a); print toupper(a[1])":"a[2]; }' |
3 TFILE=$(mktemp) |
|
4 TFILE2=$(mktemp) |
|
5 mpg123 -vtn1 --long-tag "$1" 2>&1|awk '/^\t.*:/ {match($0,"\t(.*): +(.*)",a); print toupper(a[1])":"a[2]; }' > $TFILE |
|
6 if iconv -s -f utf-8 -t latin1 $TFILE > $TFILE2 && iconv -s -f utf-8 -t utf-8 $TFILE2 > /dev/null; then |
|
7 echo "ENCODINGHACK:DOUBLE-UTF-8" |
|
8 cat $TFILE2 |
|
9 else |
|
10 if iconv -s -f utf-8 -t latin1 $TFILE > $TFILE2 && iconv -s -f cp1251 -t utf-8 $TFILE2 > /dev/null; then |
|
11 iconv -s -f cp1251 -t utf-8 $TFILE2 |
|
12 echo "ENCODINGHACK:CP1251" |
|
13 else |
|
14 echo "ENCODING:UTF-8" |
|
15 cat "$TFILE" |
|
16 fi |
|
17 fi |
|
18 rm -f $TFILE $TFILE2 |
4 echo |
19 echo |
5 |
20 |
6 |
21 |