fix(encode): propagate invalid UTF-8 key errors from headers and inline tables

Assisted-by: GLM 5.3
This commit is contained in:
2026-09-17 23:06:59 +02:00
parent ec0d7a0023
commit 54c6032a9a
3 changed files with 46 additions and 17 deletions
+4
View File
@@ -54,6 +54,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
cannot be carried verbatim by the literal form: a run of three single quotes,
a control character, or a lone carriage return. Such values previously
produced output that did not re-parse.
- `Marshal` returns an error for a table header key or an inline-table key that
is not valid UTF-8, the way scalar keys already did, instead of silently
emitting corrupt TOML (a header that lost its key, an inline table with a
missing key).
- A float with an exponent marker but no digits (`1e`, `0.0E`) is rejected;
the exponent requires at least one digit.
- A date-time offset outside 00:00 through 23:59 is rejected; such offsets