Skip to content

Commit 9b5f1a6

Browse files
committed
Address feedback
1 parent b6c8c97 commit 9b5f1a6

File tree

16 files changed

+150
-127
lines changed

16 files changed

+150
-127
lines changed

xml/System.Formats.Tar/PaxTarEntry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<Docs>
4949
<param name="other">The <see cref="T:System.Formats.Tar.TarEntry" /> instance to convert to the PAX format.</param>
5050
<summary>Initializes a new <see cref="T:System.Formats.Tar.PaxTarEntry" /> instance by converting the specified <paramref name="other" /> entry into the PAX format.</summary>
51-
<remarks>When converting a <see cref="T:System.Formats.Tar.GnuTarEntry" /> to <see cref="T:System.Formats.Tar.PaxTarEntry" /> using this constructor, the <see cref="P:System.Formats.Tar.GnuTarEntry.AccessTime" /> and <see cref="P:System.Formats.Tar.GnuTarEntry.ChangeTime" /> values will get transfered to the <see cref="P:System.Formats.Tar.PaxTarEntry.ExtendedAttributes" /> dictionary only if their values are not <see langword="default" /> (which is <see cref="F:System.DateTimeOffset.MinValue" />).</remarks>
51+
<remarks>When converting a <see cref="T:System.Formats.Tar.GnuTarEntry" /> to <see cref="T:System.Formats.Tar.PaxTarEntry" /> using this constructor, the <see cref="P:System.Formats.Tar.GnuTarEntry.AccessTime" /> and <see cref="P:System.Formats.Tar.GnuTarEntry.ChangeTime" /> values are transferred to the <see cref="P:System.Formats.Tar.PaxTarEntry.ExtendedAttributes" /> dictionary only if their values are not <see langword="default" /> (which is <see cref="F:System.DateTimeOffset.MinValue" />).</remarks>
5252
<exception cref="T:System.ArgumentException">
5353
<paramref name="other" /> is a <see cref="T:System.Formats.Tar.PaxGlobalExtendedAttributesTarEntry" /> instance.
5454

xml/System.IO.Compression/ZipArchive.xml

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -395,30 +395,42 @@ If the comment byte length is larger than <xref:System.UInt16.MaxValue>, it will
395395
<summary>Asynchronously initializes and returns a new instance of <see cref="T:System.IO.Compression.ZipArchive" /> on the given stream in the specified mode, specifying whether to leave the stream open, with an optional encoding and an optional cancellation token.</summary>
396396
<returns>To be added.</returns>
397397
<remarks>
398-
<para>Specifying a value for <paramref name="entryNameEncoding" /> other than <see langword="null" /> is discouraged. However, this might be necessary for interoperability with ZIP archive tools and libraries that don't correctly support UTF-8 encoding for entry names.</para>
399-
<para>This value is used as follows:</para>
400-
<para><strong>Reading (opening) ZIP archive files:</strong></para>
401-
<para>If <paramref name="entryNameEncoding" /> is not specified (<c>== null</c>):</para>
402-
<list>
403-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the current system default code page (<c>Encoding.Default</c>) to decode the entry name and comment.</item>
404-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) to decode the entry name and comment.</item>
405-
</list>
406-
<para>If <paramref name="entryNameEncoding" /> is specified (<c>!= null</c>):</para>
407-
<list>
408-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the specified <paramref name="entryNameEncoding" /> to decode the entry name and comment.</item>
409-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) to decode the entry name and comment.</item>
410-
</list>
411-
<para><strong>Writing (saving) ZIP archive files:</strong> </para>
412-
<para>If <paramref name="entryNameEncoding" /> is not specified (<c>== null</c>):</para>
413-
<list>
414-
<item>For entry names and comments that contain characters outside the ASCII range, the language encoding flag (EFS) will be set in the general purpose bit flag of the local file header, and UTF-8 (<c>Encoding.UTF8</c>) will be used to encode the entry name and comment into bytes.</item>
415-
<item>For entry names and comments that don't contain characters outside the ASCII range, the language encoding flag (EFS) will not be set in the general purpose bit flag of the local file header, and the current system default code page (<c>Encoding.Default</c>) will be used to encode the entry names and comments into bytes.</item>
416-
</list>
417-
<para>If <paramref name="entryNameEncoding" /> is specified (<c>!= null</c>):</para>
418-
<list>
419-
<item>The specified <paramref name="entryNameEncoding" /> will always be used to encode the entry names and comments into bytes.</item>
420-
</list>
421-
<para>The language encoding flag (EFS) in the general purpose bit flag of the local file header will be set if and only if the specified <paramref name="entryNameEncoding" /> is a UTF-8 encoding.</para>
398+
<para>Specifying a value for <paramref name="entryNameEncoding" /> other than <see langword="null" /> is discouraged. However, this might be necessary for interoperability with ZIP archive tools and libraries that don't correctly support UTF-8 encoding for entry names.</para>
399+
<para>This value is used as follows:</para>
400+
<dl>
401+
<li><strong>Reading (opening) ZIP archive files:</strong>
402+
<ul>
403+
<li>If <paramref name="entryNameEncoding" /> is not specified (<c>== null</c>):
404+
<ul>
405+
<li>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the current system default code page (<c>Encoding.Default</c>) to decode the entry name and comment.</li>
406+
<li>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) to decode the entry name and comment.</li>
407+
</ul>
408+
</li>
409+
<li>If <paramref name="entryNameEncoding" /> is specified (<c>!= null</c>):
410+
<ul>
411+
<li>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the specified <paramref name="entryNameEncoding" /> to decode the entry name and comment.</li>
412+
<li>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) to decode the entry name and comment.</li>
413+
</ul>
414+
</li>
415+
</ul>
416+
</li>
417+
<li><strong>Writing (saving) ZIP archive files:</strong>
418+
<ul>
419+
<li>If <paramref name="entryNameEncoding" /> is not specified (<c>== null</c>):
420+
<ul>
421+
<li>For entry names and comments that contain characters outside the ASCII range, the language encoding flag (EFS) will be set in the general purpose bit flag of the local file header, and UTF-8 (<c>Encoding.UTF8</c>) will be used to encode the entry name and comment into bytes.</li>
422+
<li>For entry names and comments that don't contain characters outside the ASCII range, the language encoding flag (EFS) will not be set in the general purpose bit flag of the local file header, and the current system default code page (<c>Encoding.Default</c>) will be used to encode the entry names and comments into bytes.</li>
423+
</ul>
424+
</li>
425+
<li>If <paramref name="entryNameEncoding" /> is specified (<c>!= null</c>):
426+
<ul>
427+
<li>The specified <paramref name="entryNameEncoding" /> will always be used to encode the entry names and comments into bytes.</li>
428+
<li>The language encoding flag (EFS) in the general purpose bit flag of the local file header will be set if and only if the specified <paramref name="entryNameEncoding" /> is a UTF-8 encoding.</li>
429+
</ul>
430+
</li>
431+
</ul>
432+
</li>
433+
</dl>
422434
</remarks>
423435
<exception cref="T:System.ArgumentException">
424436
<para>The stream is already closed.</para>

0 commit comments

Comments
 (0)