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

[DRAFT] Fix the issue with unicode error #55

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dawidwelna
Copy link

relates to the discussion in this issue #54
I have yet tests to implement. But after quickly changing reading.py I am able to correctly import clippings which do have polish characters such as "ę", "ł", "ą"
FYI @paperboi

@@ -0,0 +1,17 @@
name: kindle2Notion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file for? Seems like some conda stuff. If @paperboi is ok with that, please add some documentation about that, preferably to readme file.

- flake8>=3.9.2
- pytest>=6.2.4
- pytest-cov>=2.12.0
- black>=21.5b2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So dependencies are now in both places - here and in requirements.txt file?


# Gradle
.idea/**/gradle.xml
.idea/**/libraries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just .idea/? It should do the job. Why do you need to specify these all items additionally?

raw_clippings_text = open(clippings_file_path, "r", encoding="utf-8-sig").read()
raw_clippings_text = raw_clippings_text.encode("ascii").decode()
except UnicodeEncodeError:
print('UnicodeEncodeError, encoding data with utf-8')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could print the exact error here?

except UnicodeEncodeError:
print('UnicodeEncodeError, encoding data with utf-8')
raw_clippings_text = open(clippings_file_path, "r", encoding="utf-8").read()
raw_clippings_text = raw_clippings_text.encode("UTF8").decode()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should provide test for such case.

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

Successfully merging this pull request may close these issues.

None yet

2 participants