aboutsummaryrefslogtreecommitdiff
path: root/src/cmdline.opt
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-11-16 15:59:16 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-11-17 16:58:50 +0200
commit7e8606f27404fe8da3051f90eadef4076f2f7a08 (patch)
tree1c59c67ed827eda92e32dba2955b9840cbdd4774 /src/cmdline.opt
parentf55d72b20824261b5ee2fa6a87573b3f6ed2863a (diff)
downloadidest-7e8606f27404fe8da3051f90eadef4076f2f7a08.tar.gz
idest-7e8606f27404fe8da3051f90eadef4076f2f7a08.tar.bz2
Keep textual data in UTF-8 internally; provide new options for recoding
* libid3tag/tag.c (id3_tag_new): Use conservative default options. * configure.ac: Check for iconv * src/utf8conv.c: New file. * src/Makefile.am (idest_SOURCES): Add new source file. (LDADD): Link with iconv libraries. * src/backup.c (copy_file): Initialize fsize properly. * src/cmdline.opt: New options: --fixup, --broken-8bit-charset, --encoding * src/guile.c: Remove unused functions. * src/frametab.gperf: Use textual_frame_encoding. * src/idest.h: Include locale.h (latin1_option): Remove. (charset,broken_8bit_charset) (textual_frame_encoding,fixup_option): New globals. (idest_conv_mode): New enum (utf8_convert): New proto. * src/idop.c (idest_ucs4_cvt): Hanlde broken_8bit_charset option. (set_tags): Fix-up frames if so requested. * src/main.c (latin1_option): Remove. (textual_frame_encoding,fixup_option): New globals (main): Set locale. * bootstrap: Update. * gnulib: Update. * gnulib.modules: Add localcharset * doc/html.init: Minor change. * doc/idest.texi: Update docs.
Diffstat (limited to 'src/cmdline.opt')
-rw-r--r--src/cmdline.opt41
1 files changed, 38 insertions, 3 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 9ed798f..1f414a6 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -1,5 +1,5 @@
/* This file is part of Idest. -*- c -*-
- Copyright (C) 2009-2011 Sergey Poznyakoff
+ Copyright (C) 2009-2011, 2016 Sergey Poznyakoff
Idest is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -109,6 +109,13 @@ BEGIN
SET_MODE(MODE_LIST);
END
+OPTION(fixup,f,,
+ [<fixup ID3 tags>])
+BEGIN
+ fixup_option = 1;
+ SET_MODE(MODE_MOD);
+END
+
GROUP([<Operation modifiers>])
OPTION(filter,F,FRAME-LIST,
@@ -135,10 +142,38 @@ BEGIN
convert_version = get_version_list(optarg);
END
+OPTION(charset,,CODE,
+ [<use this charset for external representation>])
+BEGIN
+ charset = optarg;
+END
+
+OPTION(broken-8bit-charset,,CODE,
+ [<assume textual frames in this 8bit charset>])
+BEGIN
+ broken_8bit_charset = optarg;
+END
+
+OPTION(encoding,e,NAME,
+ [<set encoding for textual tags>])
+BEGIN
+ if (strcasecmp(optarg, "latin1") == 0
+ || strcasecmp(optarg, "iso-8859-1") == 0)
+ textual_frame_encoding = ID3_FIELD_TEXTENCODING_ISO_8859_1;
+ else if (strcasecmp(optarg, "utf-16") == 0)
+ textual_frame_encoding = ID3_FIELD_TEXTENCODING_UTF_16;
+ else if (strcasecmp(optarg, "utf-16be") == 0)
+ textual_frame_encoding = ID3_FIELD_TEXTENCODING_UTF_16BE;
+ else if (strcasecmp(optarg, "utf-8") == 0)
+ textual_frame_encoding = ID3_FIELD_TEXTENCODING_UTF_8;
+ else
+ error(1, 0, _("unsupported ID3 frame encoding"));
+END
+
OPTION(latin1,,,
- [<force latin1 output>])
+ [<same as --encoding=latin1>])
BEGIN
- latin1_option = 1;
+ charset = "iso-8859-1";
END
OPTION(verbose,v,,

Return to:

Send suggestions and report system problems to the System administrator.