-
Notifications
You must be signed in to change notification settings - Fork 77
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
encoding issue writing #55
Comments
Just wanted to confirm that this example works with ConfigObj 4.7.2 on Python 2.7, but not with any version 5.0 and up. |
Thanks, and much appreciated. Clearly there's been a lot of work on ironing just as a sanity check. Does setting On Thu, Apr 24, 2014 at 1:15 PM, beville notifications@github.com wrote:
|
With 5.0.4, trying "utf8", "utf-8", and "UTF8" didn't seem to help. I also tried setting default_encoding in the constructor, also to no avail. |
Ah, that saved me a step, thanks. By look at it tonight, I think I mean tomorrow night since I'm just now (midnight est) finishing some remodeling. On Thu, Apr 24, 2014 at 9:10 PM, beville notifications@github.com wrote:
|
pinging @EliAndrewC for a sanity check of the comments when you get a chance. Otherwise I'll merge in a release tomorrow. |
fixes #55 - can write out non-ascii characters to disk
thanks for the quick fix on this! |
not a problem, thanks for the report. :) |
I am not sure if this is a bug or just my not understanding. This is under Python 2.7, using v5.0.4 from pip. I can't seem to write out a CfgObj that has unicode strings. Here's a simple scenario:
File: 'in.ini'
code:
produces this:
There doesn't seem to be any problem reading the file in. Also, if I change the input file to have the value "Desktop" instead of "Arbeitsfläche", no problem.
What I can't understand is why it wants to use the ascii codec, when I've explicitly set the UTF8 encoder.
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: