X-Git-Url: http://git.ieval.ro/?p=fdkaac.git;a=blobdiff_plain;f=src%2Fmain.c;h=4db5fb2e8c469b0783ee939092d092048468080a;hp=6453f8aa3a9a784fb6e5536625276dfd6ddcac1a;hb=360cf7dc8bc855f246f0e80530f0b4d01345d886;hpb=43ab4331786180e5cbc368a1ade6e05543e17f44 diff --git a/src/main.c b/src/main.c index 6453f8a..4db5fb2 100644 --- a/src/main.c +++ b/src/main.c @@ -357,6 +357,14 @@ int parse_options(int argc, char **argv, aacenc_param_ex_t *params) } *val++ = '\0'; if (ch == OPT_SHORT_TAG) { + /* + * take care of U+00A9(COPYRIGHT SIGN). + * 1) if length of fcc is 3, we prepend '\xa9'. + * 2) U+00A9 becomes "\xc2\xa9" in UTF-8. Therefore + * we remove first '\xc2'. + */ + if (optarg[0] == '\xc2') + ++optarg; if ((klen = strlen(optarg))== 3) fcc = 0xa9; else if (klen != 4) {