> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# load.utils

These are utility functions helpful for loading files.

## Module Contents

### Functions

| Name                                                     | Description                    |
| -------------------------------------------------------- | ------------------------------ |
| [`detect_encoding`](#emtelliproloadutilsdetect_encoding) | Detect the encoding of a file. |

### API

#### `emtellipro.load.utils.detect_encoding`

```python
emtellipro.load.utils.detect_encoding(path: typing.Union[str, pathlib.Path]) -> str
```

Detect the encoding of a file.

If it's possible to decode the file using 'utf-8', then that's assumed to
be correct; otherwise chardet will be used to detect the most likely
encoding.

**Parameters:**

**`path`** `typing.Union[str, pathlib.Path]`

The path to a file.

---

**Return type:** `str`