omnilib/aiosqlite

utf-8 encoding in aiosql.from_path(...)

Closed this issue · 1 comments

Description

I have a column name with Danish letters which are loaded in maybe ascii:

in "query_loader.py" it can be fixed by adding encoding='utf-8' as below in the Path object method "read_text":

def load_query_data_from_file(self, path: Path, ns_parts: List[str] = []) -> List[QueryDatum]:
return self.load_query_data_from_sql(path.read_text(encoding='utf-8'), ns_parts, path)

it would be nice to have the ability to specify encoding in aiosql.from_path(...)

sorry, I posted this in the wrong repo...