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

hard coding of UTF-8 as export format for plain text #14

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

Conversation

TeresaM12
Copy link
Contributor

Problem: The native encoding of treeline seems to be utf-8. If the OS encoding is set differently (for what ever reason this is common in Windows) plain text export is not possible as there exists no transcoding function instead the export will fail.

So as long as no transcoding is done, hard coding the plain text export to utf-8 seems like a sensible solution, which is also used for treeline, xml, html exports.

@doug-101
Copy link
Owner

I decided to address this a bit differently. TreeLine still attempts to export or import using the OS system locale settings. If it sees a Unicode error, it silently falls back to utf-8 encoding. I think this gives a good compromise, since it uses the OS default when it's sensible, but avoids an error when it isn't.

Thanks,
Doug

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.

2 participants