Copying -out_charset to -in_charset after -commit

This commit is contained in:
Thomas Schmitt 2008-11-07 17:33:59 +00:00
parent 5e1e073521
commit 581ea8f33b
5 changed files with 27 additions and 2 deletions

View File

@ -559,6 +559,8 @@ will be reset to "auto".
Set the character set from which to convert file names when loading an Set the character set from which to convert file names when loading an
image. This has eventually to be done before specifying -dev , -indev or image. This has eventually to be done before specifying -dev , -indev or
-rollback. See paragraph "Character sets" for more explanations. -rollback. See paragraph "Character sets" for more explanations.
When loading the written image after -commit the setting of -out_charset
will be copied to -in_charset.
.TP .TP
\fB\-rom_toc_scan\fR "on"|"off"[:"emul_on"|"emul_off"] \fB\-rom_toc_scan\fR "on"|"off"[:"emul_on"|"emul_off"]
Read-only drives do not tell the actual media type but show any media as Read-only drives do not tell the actual media type but show any media as
@ -1360,6 +1362,8 @@ are up to 128 characters.
\fB\-out_charset\fR character_set_name \fB\-out_charset\fR character_set_name
Set the character set to which file names get converted when writing an Set the character set to which file names get converted when writing an
image. See paragraph "Character sets" for more explanations. image. See paragraph "Character sets" for more explanations.
When loading the written image after -commit the setting of -out_charset
will be copied to -in_charset.
.TP .TP
\fB\-uid\fR uid \fB\-uid\fR uid
User id to be used for all files when the new ISO tree gets written to media. User id to be used for all files when the new ISO tree gets written to media.
@ -2419,6 +2423,8 @@ Copy modified ISO image from one media to another
.br .br
Bring a prepared ISOLINUX tree onto media and make it bootable Bring a prepared ISOLINUX tree onto media and make it bootable
.br .br
Change existing file name tree from ISO-8859-1 to UTF-8
.br
Operate on storage facilities other than optical drives Operate on storage facilities other than optical drives
.br .br
Perform multi-session runs as of cdrtools traditions Perform multi-session runs as of cdrtools traditions
@ -2584,6 +2590,20 @@ Now xorriso can burn an El Torito bootable media:
.br .br
-boot_image isolinux dir=/boot/isolinux -boot_image isolinux dir=/boot/isolinux
.SS .SS
.B Change existing file name tree from ISO-8859-1 to UTF-8
This example assumes that the existing ISO image was written with character
set ISO-8859-1 but that the readers expected UTF-8. Now a new session with
the same files gets added with converted file names.
In order to avoid any weaknesses of the local character set this command
pretends that it is already the final target set UTF-8.
Therefore strange file names may appear in eventual error messages.
.br
\fB$\fR xorriso -in_charset ISO-8859-1 -local_charset UTF-8 \\
.br
-out_charset UTF-8 -dev /dev/sr0 \\
.br
-alter_date m +0 / -- -commit -eject all
.SS
.B Operate on storage facilities other than optical drives .B Operate on storage facilities other than optical drives
Full read-write operation is possible with regular files and block devices: Full read-write operation is possible with regular files and block devices:
.br .br

View File

@ -11258,6 +11258,8 @@ int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
xorriso->no_volset_present= 0; xorriso->no_volset_present= 0;
if(flag&1) if(flag&1)
return(1); return(1);
if(Sregex_string(&(xorriso->in_charset), xorriso->out_charset, 0) <= 0)
return(-1);
strcpy(newdev, xorriso->outdev); strcpy(newdev, xorriso->outdev);
if(xorriso->grow_blindly_msc2>=0) if(xorriso->grow_blindly_msc2>=0)
ret= Xorriso_option_dev(xorriso, "", 3|4); ret= Xorriso_option_dev(xorriso, "", 3|4);

View File

@ -802,5 +802,8 @@ int Sectorbitmap_get_layout(struct SectorbitmaP *o,
int Sectorbitmap_copy(struct SectorbitmaP *from, struct SectorbitmaP *to, int Sectorbitmap_copy(struct SectorbitmaP *from, struct SectorbitmaP *to,
int flag); int flag);
/* bit0= append (text!=NULL) */
int Sregex_string(char **handle, char *text, int flag);
#endif /* Xorriso_private_includeD */ #endif /* Xorriso_private_includeD */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.11.06.183736" #define Xorriso_timestamP "2008.11.07.173315"

View File

@ -8167,7 +8167,7 @@ cannot:;
} }
sprintf(xorriso->info_text, "Local character set is now assumed as: %s", sprintf(xorriso->info_text, "Local character set is now assumed as: %s",
Text_shellsafe(name, sfe, 0)); Text_shellsafe(name, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return(1); return(1);
} }