Options for -as mkisofs: -input-charset, -output-charset

This commit is contained in:
2008-12-14 23:12:05 +00:00
parent 8cfade6692
commit d0f8bb5dfe
3 changed files with 33 additions and 3 deletions

View File

@ -9364,6 +9364,8 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
" -f, -follow-links Follow symbolic links",
" -graft-points Allow to use graft points for filenames",
" -help Print option help",
" -input-charset CHARSET Local input charset for file name conversion",
" -output-charset CHARSET Output charset for file name conversion",
" -iso-level LEVEL Set ISO9660 conformance level (1..3)",
" -J, -joliet Generate Joliet directory information",
" -o FILE, -output FILE Set output file name",
@ -9511,6 +9513,28 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
ret= Xorriso_option_boot_image(xorriso, "isolinux", sfe, 0);
if(ret <= 0)
goto problem_handler_1;
} else if(strcmp(argv[i], "-input-charset")==0) {
if(i+1>=argc)
goto not_enough_args;
i++;
/* -local_charset */
if(strcmp(argv[i], "default") == 0)
ret= Xorriso_option_charset(xorriso, "ISO-8859-1", 4);
else
ret= Xorriso_option_charset(xorriso, argv[i], 4);
if(ret <= 0)
goto problem_handler_1;
} else if(strcmp(argv[i], "-output-charset")==0) {
if(i+1>=argc)
goto not_enough_args;
i++;
/* -charset */
if(strcmp(argv[i], "default") == 0)
ret= Xorriso_option_charset(xorriso, "ISO-8859-1", 3);
else
ret= Xorriso_option_charset(xorriso, argv[i], 3);
if(ret <= 0)
goto problem_handler_1;
} else
was_other_option= 1;
@ -9709,6 +9733,12 @@ not_enough_args:;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-boot-info-table")==0) {
;
} else if(strcmp(argv[i], "-input-charset")==0) {
i++;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-output-charset")==0) {
i++;
/* was already handled in first argument scan */;
} else if(argv[i][0]=='-' && argv[i][1]!=0) {
sprintf(xorriso->info_text, "-as %s: Unknown option %s",
whom, Text_shellsafe(argv[i], sfe, 0));