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

Fix UnicodeEncodeError by ensuring UTF-8 encoding for file writes #69

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

Conversation

trunksn1
Copy link

@trunksn1 trunksn1 commented Oct 5, 2024

his pull request addresses an issue encountered when using the Grasp extension with non-English characters. Specifically, an error (UnicodeEncodeError) occurred when attempting to write characters that are not supported by the default encoding on Windows (cp1252).

Changes Made:
Updated the append_org function in the main.py file to explicitly use UTF-8 encoding when writing to the .org file.
Reason for Change:
Using UTF-8 encoding ensures that the application can handle a broader range of characters, including Greek letters and other non-ASCII characters. This enhancement improves the usability of the extension for users who work with scientific articles containing diverse character sets.

How to Test:
Capture a note with non-English characters (e.g., Greek letters like "α-actinin").
Verify that the note is written to the .org file without any errors.

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.

1 participant