Skip to content

Commit

Permalink
doc/go1.17: document fixes for negative rune handling
Browse files Browse the repository at this point in the history
CL 317273 accidentally grouped a fix for bufio, bytes, strings
packages into a single entry, but they should be separate ones.

Fix that, and document these negative rune handling fixes.

The list of fixed functions in package unicode was computed by
taking the functions covered by the new TestNegativeRunes test,
and including those that fail when tested with Go 1.16.3.

For #44513.
Updates #43254.

Change-Id: I6f387327f83ae52543526dbdcdd0bb5775c678bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/317469
Reviewed-by: David Benjamin <[email protected]>
Reviewed-by: Alexander Rakoczy <[email protected]>
Trust: Alexander Rakoczy <[email protected]>
Trust: Dmitri Shuralyov <[email protected]>
Run-TryBot: Alexander Rakoczy <[email protected]>
  • Loading branch information
dmitshur committed May 6, 2021
1 parent d2fd503 commit 54e20b5
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions doc/go1.17.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,25 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
</dd>
</dl><!-- archive/zip -->

<dl id="bufio, bytes, strings"><dt><a href="/pkg/bufio, bytes, strings/">bufio, bytes, strings</a></dt>
<dl id="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
<dd>
<p><!-- CL 280492 -->
TODO: <a href="https://golang.org/cl/280492">https://golang.org/cl/280492</a>: handle negative runes in WriteRune
The <a href="/pkg/bufio/#Writer.WriteRune"><code>Writer.WriteRune</code></a> method
now writes the replacement character U+FFFD for negative rune values,
as it does for other invalid runes.
</p>
</dd>
</dl><!-- bufio, bytes, strings -->
</dl><!-- bufio -->

<dl id="bytes"><dt><a href="/pkg/bytes/">bytes</a></dt>
<dd>
<p><!-- CL 280492 -->
The <a href="/pkg/bytes/#Buffer.WriteRune"><code>Buffer.WriteRune</code></a> method
now writes the replacement character U+FFFD for negative rune values,
as it does for other invalid runes.
</p>
</dd>
</dl><!-- bytes -->

<dl id="compress/lzw"><dt><a href="/pkg/compress/lzw/">compress/lzw</a></dt>
<dd>
Expand Down Expand Up @@ -416,6 +428,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
</dd>
</dl><!-- strconv -->

<dl id="strings"><dt><a href="/pkg/strings/">strings</a></dt>
<dd>
<p><!-- CL 280492 -->
The <a href="/pkg/strings/#Builder.WriteRune"><code>Builder.WriteRune</code></a> method
now writes the replacement character U+FFFD for negative rune values,
as it does for other invalid runes.
</p>
</dd>
</dl><!-- strings -->

<dl id="sync/atomic"><dt><a href="/pkg/sync/atomic/">sync/atomic</a></dt>
<dd>
<p><!-- CL 241678 -->
Expand Down Expand Up @@ -477,7 +499,18 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
<dd>
<p><!-- CL 280493 -->
TODO: <a href="https://golang.org/cl/280493">https://golang.org/cl/280493</a>: correctly handle negative runes
The <a href="/pkg/unicode/#Is"><code>Is</code></a>,
<a href="/pkg/unicode/#IsGraphic"><code>IsGraphic</code></a>,
<a href="/pkg/unicode/#IsLetter"><code>IsLetter</code></a>,
<a href="/pkg/unicode/#IsLower"><code>IsLower</code></a>,
<a href="/pkg/unicode/#IsMark"><code>IsMark</code></a>,
<a href="/pkg/unicode/#IsNumber"><code>IsNumber</code></a>,
<a href="/pkg/unicode/#IsPrint"><code>IsPrint</code></a>,
<a href="/pkg/unicode/#IsPunct"><code>IsPunct</code></a>,
<a href="/pkg/unicode/#IsSpace"><code>IsSpace</code></a>,
<a href="/pkg/unicode/#IsSymbol"><code>IsSymbol</code></a>, and
<a href="/pkg/unicode/#IsUpper"><code>IsUpper</code></a> functions
now return <code>false</code> on negative rune values, as they do for other invalid runes.
</p>
</dd>
</dl><!-- unicode -->

0 comments on commit 54e20b5

Please sign in to comment.