hydra.overlay.python.lib.text module
Python implementations of hydra.overlay.python.lib.text primitives.
UTF-8 codec primitives bridging Hydra strings and raw bytes (binary). These pair with hydra.overlay.python.lib.files.readFile / writeFile, which are byte-oriented. For #494.
- hydra.overlay.python.lib.text.decode_utf8(data: bytes) object
Decode a sequence of bytes as UTF-8 text.
Returns Right(text) on success, or Left(message) if the bytes are not valid UTF-8, where message is a host-provided description of the decoding failure.
- hydra.overlay.python.lib.text.encode_utf8(text: str) bytes
Encode text as a sequence of UTF-8 bytes. Total: every Hydra string is valid Unicode.