diff --git a/includes/remarks/System.IO.Compression/ZipArchive/.ctor_Stream_ZipArchiveMode_Boolean_Encoding.md b/includes/remarks/System.IO.Compression/ZipArchive/.ctor_Stream_ZipArchiveMode_Boolean_Encoding.md index dc5e6529c83..c2769c4f11b 100644 --- a/includes/remarks/System.IO.Compression/ZipArchive/.ctor_Stream_ZipArchiveMode_Boolean_Encoding.md +++ b/includes/remarks/System.IO.Compression/ZipArchive/.ctor_Stream_ZipArchiveMode_Boolean_Encoding.md @@ -1,21 +1,21 @@ If the `mode` parameter is set to , the stream must support reading. If the `mode` parameter is set to , the stream must support writing. If the `mode` parameter is set to , the stream must support reading, writing, and seeking. -When you open a zip archive file for reading and `entryNameEncoding` is set to `null`, entry names are decoded according to the following rules: +When you open a zip archive file for reading and `entryNameEncoding` is set to `null`, entry names and comments are decoded according to the following rules: -- When the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the current system default code page is used to decode the entry name. +- When the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the current system default code page is used to decode the entry name and comment. -- When the language encoding flag is set, UTF-8 is used to decode the entry name. +- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment. -When you open a zip archive file for reading and `entryNameEncoding` is set to a value other than `null`, entry names are decoded according to the following rules: +When you open a zip archive file for reading and `entryNameEncoding` is set to a value other than `null`, entry names and comments are decoded according to the following rules: -- When the language encoding flag is not set, the specified `entryNameEncoding` is used to decode the entry name. +- When the language encoding flag is not set, the specified `entryNameEncoding` is used to decode the entry name and comment. -- When the language encoding flag is set, UTF-8 is used to decode the entry name. +- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment. -When you write to archive files and `entryNameEncoding` is set to `null`, entry names are encoded according to the following rules: +When you write to archive files and `entryNameEncoding` is set to `null`, entry names and comments are encoded according to the following rules: -- For entry names that contain characters outside the ASCII range, the language encoding flag is set, and entry names are encoded by using UTF-8. +- For entry names and comments that contain characters outside the ASCII range, the language encoding flag is set, and entry names and comments are encoded by using UTF-8. -- For entry names that contain only ASCII characters, the language encoding flag is not set, and entry names are encoded by using the current system default code page. +- For entry names and comments that contain only ASCII characters, the language encoding flag is not set, and entry names and comments are encoded by using the current system default code page. -When you write to archive files and `entryNameEncoding` is set to a value other than `null`, the specified `entryNameEncoding` is used to encode the entry names into bytes. The language encoding flag (in the general-purpose bit flag of the local file header) is set only when the specified encoding is a UTF-8 encoding. +When you write to archive files and `entryNameEncoding` is set to a value other than `null`, the specified `entryNameEncoding` is used to encode the entry names and comments into bytes. The language encoding flag (in the general-purpose bit flag of the local file header) is set only when the specified encoding is a UTF-8 encoding. diff --git a/includes/remarks/System.IO.Compression/ZipFile/Open.md b/includes/remarks/System.IO.Compression/ZipFile/Open.md index 83fc67a82b7..15ba399c87f 100644 --- a/includes/remarks/System.IO.Compression/ZipFile/Open.md +++ b/includes/remarks/System.IO.Compression/ZipFile/Open.md @@ -4,22 +4,22 @@ When you set the `mode` parameter to , the archive is opened with as the file mode value. If the archive exists, it is opened. The existing entries can be modified and new entries can be created. If the archive does not exist, a new archive is created; however, creating a zip archive in mode is not as efficient as creating it in mode. -When you open a zip archive file for reading and `entryNameEncoding` is set to `null`, entry names are decoded according to the following rules: +When you open a zip archive file for reading and `entryNameEncoding` is set to `null`, entry names and comments are decoded according to the following rules: -- When the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the current system default code page is used to decode the entry name. +- When the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the current system default code page is used to decode the entry name and comment. -- When the language encoding flag is set, UTF-8 is used to decode the entry name. +- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment. -When you open a zip archive file for reading and `entryNameEncoding` is set to a value other than `null`, entry names are decoded according to the following rules: +When you open a zip archive file for reading and `entryNameEncoding` is set to a value other than `null`, entry names and comments are decoded according to the following rules: -- When the language encoding flag is not set, the specified `entryNameEncoding` is used to decode the entry name. +- When the language encoding flag is not set, the specified `entryNameEncoding` is used to decode the entry name and comment. -- When the language encoding flag is set, UTF-8 is used to decode the entry name. +- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment. -When you write to archive files and `entryNameEncoding` is set to `null`, entry names are encoded according to the following rules: +When you write to archive files and `entryNameEncoding` is set to `null`, entry names and comments are encoded according to the following rules: -- For entry names that contain characters outside the ASCII range, the language encoding flag is set, and entry names are encoded by using UTF-8. +- For entry names or comments that contain characters outside the ASCII range, the language encoding flag is set, and entry names and comments are encoded by using UTF-8. -- For entry names that contain only ASCII characters, the language encoding flag is not set, and entry names are encoded by using the current system default code page. +- For entry names or comments that contain only ASCII characters, the language encoding flag is not set, and entry names and comments are encoded by using the current system default code page. -When you write to archive files and `entryNameEncoding` is set to a value other than `null`, the specified `entryNameEncoding` is used to encode the entry names into bytes. The language encoding flag (in the general-purpose bit flag of the local file header) is set only when the specified encoding is a UTF-8 encoding. +When you write to archive files and `entryNameEncoding` is set to a value other than `null`, the specified `entryNameEncoding` is used to encode the entry names and comments into bytes. The language encoding flag (in the general-purpose bit flag of the local file header) is set only when the specified encoding is a UTF-8 encoding. diff --git a/xml/System.IO.Compression/ZipArchive.xml b/xml/System.IO.Compression/ZipArchive.xml index 7b13915d34d..22d78b01d51 100644 --- a/xml/System.IO.Compression/ZipArchive.xml +++ b/xml/System.IO.Compression/ZipArchive.xml @@ -276,7 +276,7 @@ One of the enumeration values that indicates whether the zip archive is used to read, create, or update entries. to leave the stream open after the object is disposed; otherwise, . - The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names. + The encoding to use when reading or writing entry names and comments in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names or comments. Initializes a new instance of the class on the specified stream for the specified mode, uses the specified encoding for entry names, and optionally leaves the stream open. One of the enumeration values that indicates whether to emphasize speed or compression effectiveness when creating the entry. to include the directory name from at the root of the archive; to include only the contents of the directory. - The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names. - Creates a zip archive in the specified stream that contains the files and directories from the specified directory, uses the specified compression level and character encoding for entry names, and optionally includes the base directory. + The encoding to use when reading or writing entry names and comments in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names or comments. + Creates a zip archive in the specified stream that contains the files and directories from the specified directory, uses the specified compression level and character encoding for entry names and comments, and optionally includes the base directory. The directory structure from the file system is preserved in the archive. If the directory is empty, an empty archive is created. Use this method overload to specify the compression level and character encoding, and whether to include the base directory in the archive. If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an exception. @@ -488,8 +488,8 @@ An I/O error occurred while opening a file to be archived. One of the enumeration values that indicates whether to emphasize speed or compression effectiveness when creating the entry. to include the directory name from at the root of the archive; to include only the contents of the directory. - The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names. - Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression level and character encoding for entry names, and optionally includes the base directory. + The encoding to use when reading or writing entry names and comments in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names or comments. + Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression level and character encoding for entry names and comments, and optionally includes the base directory. If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an exception. - If `entryNameEncoding` is set to a value other than `null`, the entry names are encoded by using the specified encoding. If the specified encoding is a UTF-8, the language encoding flag (in the general-purpose bit flag of the local file header) is set for each entry, + If `entryNameEncoding` is set to a value other than `null`, the entry names and comments are encoded by using the specified encoding. If the specified encoding is a UTF-8 encoding, the language encoding flag (in the general-purpose bit flag of the local file header) is set for each entry. - If `entryNameEncoding` is set to `null`, the entry names are encoded according to the following rules: + If `entryNameEncoding` is set to `null`, the entry names and comments are encoded according to the following rules: -- For entry names that contain characters outside the ASCII range, the language encoding flag is set, and UTF-8 is used to encode the entry name. +- For entry names and comments that contain characters outside the ASCII range, the language encoding flag is set, and UTF-8 is used to encode the entry name and comment. -- For entry names that contain only ASCII characters, the language encoding flag is set, and the current system default code page is used to encode the entry names. +- For entry names and comments that contain only ASCII characters, the language encoding flag is not set, and the current system default code page is used to encode the entry names and comments. ]]> @@ -800,8 +800,8 @@ An archive entry was compressed by using a compression method that is not suppor The stream from which the zip archive is to be extracted. The path to the directory in which to place the extracted files, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory. - The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names. - Extracts all the files from the zip archive stored in the specified stream and places them in the specified destination directory on the file system and uses the specified character encoding for entry names. + The encoding to use when reading or writing entry names and comments in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names or comments. + Extracts all the files from the zip archive stored in the specified stream and places them in the specified destination directory on the file system and uses the specified character encoding for entry names and comments. This method creates the specified directory and all subdirectories. The destination directory cannot already exist. Exceptions related to validating the paths in the or the files in the zip archive contained in parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted. Each extracted file has the same relative path to the directory specified by as its source entry has to the root of the archive. @@ -986,8 +986,8 @@ A has been compressed usi The path to the archive that is to be extracted. The path to the directory in which to place the extracted files, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory. - The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names. - Extracts all the files in the specified zip archive to a directory on the file system and uses the specified character encoding for entry names. + The encoding to use when reading or writing entry names and comments in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names or comments. + Extracts all the files in the specified zip archive to a directory on the file system and uses the specified character encoding for entry names and comments. has been compressed usi This method creates the specified directory and all subdirectories, if necessary. Exceptions related to validating the paths in the `destinationDirectoryName` or `sourceArchiveFileName` parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted. Each extracted file has the same relative path to the directory specified by `destinationDirectoryName` as its source entry has to the root of the archive. -If `entryNameEncoding` is set to a value other than `null`, entry names are decoded according to the following rules: +If `entryNameEncoding` is set to a value other than `null`, entry names and comments are decoded according to the following rules: -- For entry names where the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the entry names are decoded by using the specified encoding. -- For entries where the language encoding flag is set, the entry names are decoded by using UTF-8. +- For entries where the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the entry names and comments are decoded by using the specified encoding. +- For entries where the language encoding flag is set, the entry names and comments are decoded by using UTF-8. -If `entryNameEncoding` is set to `null`, entry names are decoded according to the following rules: +If `entryNameEncoding` is set to `null`, entry names and comments are decoded according to the following rules: -- For entries where the language encoding flag (in the general-purpose bit flag of the local file header) is not set, entry names are decoded by using the current system default code page. -- For entries where the language encoding flag is set, the entry names are decoded by using UTF-8. +- For entries where the language encoding flag (in the general-purpose bit flag of the local file header) is not set, entry names and comments are decoded by using the current system default code page. +- For entries where the language encoding flag is set, the entry names and comments are decoded by using UTF-8. ]]> @@ -1077,10 +1077,10 @@ If `entryNameEncoding` is set to `null`, entry names are decoded according to th The stream from which the zip archive is to be extracted. The path to the directory in which to place the extracted files, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory. - The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names. + The encoding to use when reading or writing entry names and comments in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names or comments. to overwrite files; otherwise. - Extracts all the files from the zip archive stored in the specified stream and places them in the specified destination directory on the file system, uses the specified character encoding for entry names, and optionally allows choosing if the files in the destination directory should be overwritten. + Extracts all the files from the zip archive stored in the specified stream and places them in the specified destination directory on the file system, uses the specified character encoding for entry names and comments, and optionally allows choosing if the files in the destination directory should be overwritten. This method creates the specified directory and all subdirectories. The destination directory cannot already exist. Exceptions related to validating the paths in the or the files in the zip archive contained in parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted. Each extracted file has the same relative path to the directory specified by as its source entry has to the root of the archive. @@ -1164,7 +1164,7 @@ An archive entry was compressed by using a compression method that is not suppor The path on the file system to the archive that is to be extracted. The path to the destination directory on the file system. - The encoding to use when reading entry names in this . + The encoding to use when reading entry names and comments in this . to overwrite files; otherwise. Extracts all of the files in the specified archive to a directory on the file system. @@ -1391,8 +1391,8 @@ An unspecified I/O error occurred while opening the file. The path to the archive to open, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory. One of the enumeration values that specifies the actions that are allowed on the entries in the opened archive. - The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names. - Opens a zip archive at the specified path, in the specified mode, and by using the specified character encoding for entry names. + The encoding to use when reading or writing entry names and comments in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names or comments. + Opens a zip archive at the specified path, in the specified mode, and by using the specified character encoding for entry names and comments. The opened zip archive.