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

Unicode parsing #50

Closed
woble opened this issue Jun 8, 2016 · 1 comment
Closed

Unicode parsing #50

woble opened this issue Jun 8, 2016 · 1 comment

Comments

@woble
Copy link

woble commented Jun 8, 2016

Files containing for example Chinese characters do not get parsed and the plugin produces an error similar to this:

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 885: character maps to <undefined>

Easy way to fix this is to modify style_parser.py on lines 99 and 131 by adding encoding='utf8' to the open function.

Before:

 98            get_output_panel().set_name(file_path)
 99            with open(file_path, 'r') as f:
100                content = f.read()

After:

 98            get_output_panel().set_name(file_path)
 99            with open(file_path, 'r', encoding='utf8') as f:
100                content = f.read()
This was referenced Sep 28, 2016
katerlouis added a commit to katerlouis/CSS-Extended that referenced this issue Sep 28, 2016
Solution for issue subhaze#53 with solution provided in issue subhaze#50
@subhaze
Copy link
Owner

subhaze commented Jun 30, 2017

I've merged @katerlouis PR, so this should hopefully be fixed.

@subhaze subhaze closed this as completed Jun 30, 2017
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