|
Entropic 2.3.8
Local-first agentic inference engine
|
Implementation of sanitize_utf8(). More...

Go to the source code of this file.
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Functions | |
| ENTROPIC_EXPORT std::string | entropic::mcp::sanitize_utf8 (std::string_view input) |
| Replace invalid UTF-8 byte sequences with U+FFFD. | |
| std::string entropic::mcp::sanitize_utf8 | ( | std::string_view | input | ) |
Replace invalid UTF-8 byte sequences with U+FFFD.
| input | Raw bytes from a tool-result subprocess. Treated as a byte sequence, not a code-point sequence. |
input if already valid UTF-8, or with each malformed byte sequence replaced by U+FFFD (the Unicode replacement character).Continuation bytes must be in 0x80..0xBF; a missing or out-of-range continuation triggers replacement and advances past the leading byte only (the next byte gets a fresh validation pass — Bjoern Hoehrmann's "robust resync" property).
@utility
| input | Raw bytes (potentially malformed). |
Definition at line 96 of file utf8_sanitize.cpp.