From d0f8bb5dfe3d1208274de8a1d7722dc76a0bd80f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 14 Dec 2008 23:12:05 +0000 Subject: [PATCH] Options for -as mkisofs: -input-charset, -output-charset --- xorriso/xorriso.1 | 4 ++-- xorriso/xorriso.c | 30 ++++++++++++++++++++++++++++++ xorriso/xorriso_timestamp.h | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index 8d777b0b..d2ed2864 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.1 @@ -2257,8 +2257,8 @@ Personality "\fBmkisofs\fR" accepts the options listed with: .br Among them: -R (always on), -J, -o, -M, -C, -path-list, -m, -exclude-list, -f, -print-size, -pad, -no-pad, -V, -v, -version, -graft-points, --no-emul-boot, -b, -c, -boot-info-table, -boot-load-size, -pathspecs as with xorriso -add. +-no-emul-boot, -b, -c, -boot-info-table, -boot-load-size, -input-charset, +-output-charset, pathspecs as with xorriso -add. A lot of options are not supported and lead to failure of the mkisofs emulation. Some are ignored, but better do not rely on this tolerance. .br diff --git a/xorriso/xorriso.c b/xorriso/xorriso.c index db079a54..ca30d980 100644 --- a/xorriso/xorriso.c +++ b/xorriso/xorriso.c @@ -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)); diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 19e2cefb..1e4d22ed 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.12.14.151550" +#define Xorriso_timestamP "2008.12.14.231145"