MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _detect_bom_encoding

Function _detect_bom_encoding

src/command_system/input_processing.py:221–226  ·  view source on GitHub ↗

Return the Python codec name implied by a BOM prefix, or None.

(head: bytes)

Source from the content-addressed store, hash-verified

219
220
221def _detect_bom_encoding(head: bytes) -> str | None:
222 """Return the Python codec name implied by a BOM prefix, or None."""
223 for sig, enc in _BOM_ENCODINGS:
224 if head.startswith(sig):
225 return enc
226 return None
227
228
229def _looks_like_binary(path: str) -> bool:

Callers 2

_looks_like_binaryFunction · 0.85
_read_text_with_encodingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected