Read a file and return its contents as a UTF-8 string.
(filepath: str)
| 341 | |
| 342 | |
| 343 | def read_utf8(filepath: str) -> str: |
| 344 | """Read a file and return its contents as a UTF-8 string.""" |
| 345 | with open(filepath, "rb") as f: |
| 346 | return f.read().decode("utf-8") |
| 347 | |
| 348 | |
| 349 | class UnixSocketHTTPConnection(http.client.HTTPConnection): |