Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_ixbrl should add encoding argument #81

Closed
fhopecc opened this issue Apr 4, 2022 · 2 comments
Closed

parse_ixbrl should add encoding argument #81

fhopecc opened this issue Apr 4, 2022 · 2 comments
Assignees

Comments

@fhopecc
Copy link
Contributor

fhopecc commented Apr 4, 2022

If the encoding of instance is utf8 but the locale encoding is cp950, then it crahsed. Just adding encoding option to specified the encoding of the instance file for parse_ixbrl function as following:

def parse_ixbrl(instance_path: str, cache: HttpCache, instance_url: str or None = None
               ,encoding='utf8'
               ) -> XbrlInstance:

    instance_file = open(instance_path, "r", encoding=encoding)
@manusimidt manusimidt self-assigned this Apr 5, 2022
@manusimidt
Copy link
Owner

Sounds like a good suggestion. I will implement it in this week.

manusimidt added a commit that referenced this issue Apr 5, 2022
@fhopecc
Copy link
Contributor Author

fhopecc commented Oct 9, 2022

Thanks for adding this function!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants