]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Ability to specify codepage
authorSergey Matveev <stargrave@stargrave.org>
Mon, 30 May 2022 08:26:05 +0000 (11:26 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 30 May 2022 08:26:05 +0000 (11:26 +0300)
bin/bin/cueparser.sh

index 607d26837abd8a94d1904a50881fea6a10328b5e..2e61004f56ffd9c4335a57df6bd99337e01e8925 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 c=1
-iconv -f latin1 -t utf-8 "$1" |
+iconv -f ${2:-cp1251} -t utf-8 "$1" |
 sed -n 's/^  *TITLE .\(.*\)".*$/\1/p' | while read trackname; do
        v=`printf "%02d\n" $c`
        echo mv split-track$v.wav $v.\"$trackname\".wav