diff options
| author | David Finkel <david.finkel@gmail.com> | 2026-02-05 18:10:43 -0500 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-02-23 15:50:31 -0800 |
| commit | cdf8951060a3e86736adc8a8b3f702a8cb22a3fa (patch) | |
| tree | 47a149ddb805768901e5de99a44b69ba9426a006 /src/cmd/compile | |
| parent | 215a070a049ce449480ca6948e7fafdeb7b16920 (diff) | |
| download | go-cdf8951060a3e86736adc8a8b3f702a8cb22a3fa.tar.xz | |
runtime: printquoted: preserve bytes of invalid UTF-8 encodings
Previously, printquoted would render each byte of an invalid UTF-8
sequence as "\uFFFD", which was lossy.
This CL adjusts printquoted to distinguish valid encodings of U+FFFD
from invalid encodings; each byte of the latter is now printed
losslessly as "\xXX"
Updates #76349
Change-Id: If9a877f01b497763425d9d11a58eb2a6e2c816b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/742305
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/compile')
0 files changed, 0 insertions, 0 deletions
