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

Question: is non-utf8 supported on Python 3? #111

Open
mauritsvanrees opened this issue Aug 6, 2021 · 0 comments
Open

Question: is non-utf8 supported on Python 3? #111

mauritsvanrees opened this issue Aug 6, 2021 · 0 comments
Labels

Comments

@mauritsvanrees
Copy link
Member

While creating PR #110, I ran into code and tests that tried to support other encodings, for example iso-8859-1, at least when importing an XML file. But some parts of the code ignore this on Python 3.

So I wonder: does GenericSetup on Python 3 only support utf-8?
If so, then some code could be simplified, for example the code in that PR.
But simplifying may need to wait until we drop support for Python 2, and/or we require Zope 5.3, where lines properties are text instead of bytes.

I wonder the same about Zope 5: does that only support bytes encoded as utf-8, at least when stored in the Data.fs?

Note: since Plone 4.3, core Plone assumes all bytes that are read from Data.fs are utf-8 encoded (or simple ascii), where previously you could set a default_charset property (preferably only set it once, never change it). See this commit from 2012.

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

No branches or pull requests

1 participant