Package: mp32ogg
Version: 0.11-9
Followup-For: Bug #442868
tags 442868 patch
thanks
By default mp32ogg corrupts cyrillic tags assuming that they are in iso8859-1
encoding. It seem to be same for other non-8859-1 encodings.
Sending patch adding --from-charset option to recode from arbitrary encoding
to utf8.
Maybe proper way is to encode from 'from-charset' to local encoding?
Pavel
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to ru_RU.UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages mp32ogg depends on:
ii libmp3-info-perl 1.22-1 Perl MP3::Info - Manipulate / fetc
ii libstring-shellquote-perl 1.03-1 quote strings for passing through
ii mpg123 0.59r-22 MPEG layer 1/2/3 audio player
ii mpg123-esd [mpg123] 0.59r-22 MPEG layer 1/2/3 audio player with
ii perl 5.8.8-12 Larry Wall's Practical Extraction
ii vorbis-tools 1.1.1-5 several Ogg Vorbis tools
mp32ogg recommends no packages.
-- no debconf information
>From 08c28fbd03b1a7da2a815560f0a583cec09b2e3a Mon Sep 17 00:00:00 2001
From: Pavel Shramov <[EMAIL PROTECTED]>
Date: Sat, 22 Dec 2007 19:34:22 +0300
Subject: [PATCH] added from-charset option
---
mp32ogg | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/mp32ogg b/mp32ogg
index 3030ca5..476d0c4 100755
--- a/mp32ogg
+++ b/mp32ogg
@@ -111,6 +111,7 @@ GetOptions("help|?",\&showhelp,
"lowercase",
"no-replace",
"verbose",
+ "from-charset=s",
"preserve-timestamp",
"<>", \&checkfile);
@@ -127,7 +128,8 @@ sub showhelp() {
print " for the track\n";
print "--lowercase Force lowercase filenames when using
--rename\n";
print "--verbose Verbose output\n";
- print "--preserve-timestamp Preserve file timestamp\n";
+ print "--from-charset Recode tags from charset CHARSET to
UTF-8\n";
+ print "--preserve-timestamp Preserve file timestamp\n";
print "--help Display this help message\n";
exit;
@@ -160,6 +162,7 @@ sub ConvertFile() {
my $filename = $opt_rename;
my $lowercase = $opt_lowercase;
my $noreplace = $opt_no_replace;
+ my $from_charset = $opt_from_charset;
my $verbose = $opt_verbose;
my $preserve_timestamp = $opt_preserve_timestamp;
@@ -172,7 +175,11 @@ sub ConvertFile() {
# really wants to deal with plain old sequences-of-octets, so encode
# those strings.
for $key (keys %$info) {
- $info->{$key} = encode(langinfo(CODESET), $info->{$key});
+ if($from_charset ne "") {
+ $info->{$key} = encode("utf8", decode($from_charset,
$info->{$key}));
+ } else {
+ $info->{$key} = encode(langinfo(CODESET), $info->{$key});
+ }
}
$_ = $filename;
--
1.5.3.5
>From e7345b12f368b40e4ffa4b3018d77708b8da60bc Mon Sep 17 00:00:00 2001
From: Pavel Shramov <[EMAIL PROTECTED]>
Date: Sat, 22 Dec 2007 19:48:53 +0300
Subject: [PATCH] document --from-charset option
---
debian/mp32ogg.1 | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/debian/mp32ogg.1 b/debian/mp32ogg.1
index 85f30dc..5e37d15 100644
--- a/debian/mp32ogg.1
+++ b/debian/mp32ogg.1
@@ -57,6 +57,9 @@ Verbose output
.TP
.B \-\-preserve\-timestamp
Preserve file timestamp
+.TP
+.B \-\-from\-charset=CHARSET
+Reencode IDv3 tags from CHARSET to UTF8.
.SH SEE ALSO
.BR oggenc (1),
.br
--
1.5.3.5