ZConfig and accentuated (no ASCII) characters with python 2.7 under windows 10
Cyril Giraudon <[email protected]> Wed, 3 Oct 2018 02:56:17 -0700 (PDT)
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
Dear all,
I use Python 2.7 and ZEO 4.2.0 under a French Windows 10.
I needed to use a path with an accentuated character in the filestorage
bracket of the ZEO config file:
<zeo>
address localhost:23914
</zeo>
<eventlog>
level INFO
<logfile>
path c:\path\to\log\server-23914.log
</logfile>
</eventlog>
<filestorage 1>
path C:/path/to/test/NETTOPĂ©\data.fs
</filestorage>
After several attempts with ("utf-8", "iso-8859-1"), I always obtain the
following error:
> python -m ZEO.runzeo -C .\zeo.conf
...
...
File
"c:\users\cyril\dev\projects\cablesim\envs\adk-2-bw\python27\lib\site-packages\ZConfig\loader.py",
line 230, in openResource
data = file.read().decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 254:
ordinal not in range(128)
Finally, this seems logical, since the default encoding of the decode
method in python 2.7 is ascii.
So, I 'd like to know if any workaround exist or if I have to forbid no
ascii path ?
Thanks a lot,
Cyril.
--
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.