Submitted by : at: 2004-05-17T00:37:09+00:00 (16 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Sorry to come back on that issue, but the current page was not so clear to me. I am running Windows NT, Zope V2.7, Plone 2.0 and Zwiki V0.30, my locale in 'zope.conf' is set to 'french' and I get the following traceback when starting Zope:

Traceback (most recent call last):
File "C:\logiciel\Zope-2.7.0\lib\python\OFS\", line 654, in import_product
  product=__import__(pname, global_dict, global_dict, silly)
File "C:\logiciel\Zope-2.7.0\lib\python\Products\ZWiki\", line 10, in ?
  import ZWikiPage, ZWikiWeb, Permissions, Defaults
File "C:\logiciel\Zope-2.7.0\lib\python\Products\ZWiki\", line 63, in ?
  from Regexps import url, bracketedexpr, doublebracketedexpr, \
File "C:\logiciel\Zope-2.7.0\lib\python\Products\ZWiki\", line 89, in ?
  uppercase_uc = unicode(string.uppercase)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8a in position 26: ordinal not in range(128)

I understood that Zwiki had been fixed as far as this issue is concerned... Did I miss something ?

Thank you for your support.

... --SimonMichael, Mon, 17 May 2004 19:42:17 -0700 reply

This seems a continuation of #769 LookupError: unknown encoding: eucJP prevents Zwiki product initialization, I'll reply there. Actually I don't know if it is - moving the thread back here.

but --SimonMichael, Mon, 17 May 2004 19:47:46 -0700 reply

Please remove the try: line and except: clause starting at line 85 and try again. What error message do you see now ? Something like 'LookupError?: unknown encoding: ...' ?

but --Tue, 18 May 2004 01:23:18 -0700 reply

Thank you Simon. Yes, I see a 'LookupError?: unknown encoding: 1252'.

Zwiki, Zope or Python bug --Tue, 18 May 2004 01:32:41 -0700 reply

I just need to know where to look at in order to fix this bug. Is it a bug due to Zwiki itself, to Zope or to Python. If there is a work-around, can you please provide it explicitely? Thanks a lot (the failing line is '", line 86, in ? uppercase_uc = unicode(string.uppercase,encoding)' !

Zwiki, Zope or Python bug --SimonMichael, Tue, 18 May 2004 09:48:16 -0700 reply

I believe it's a python bug. You might find clues in the PythonBugs? tracker. Changing your locale or character encoding somehow should get around it. All I know about this is recorded above. Perhaps some other french zwiki user can let us know how they got it working ?

french locale installed on your system ? --simon, Thu, 20 May 2004 11:17:25 -0700 reply

Perhaps you need to install some locale files on your system ? Or perhaps the 'french' locale name isn't supported on windows ?

As a data point, on debian I made sure all french locales were installed and now I can do this:

> python
Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
[GCC 3.3.3 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL,('fr_FR'))
>>> locale.getlocale()
['fr_FR', 'ISO8859-1']
>>> locale.setlocale(locale.LC_ALL,('fr_FR.UTF-8'))
>>> locale.getlocale()
['fr_FR', 'utf']
>>> locale.setlocale(locale.LC_ALL,('fr_FR.UTF-8@euro'))
>>> locale.getlocale()
['fr_FR', 'utf-8']
>>> locale.setlocale(locale.LC_ALL,('french'))
>>> locale.getlocale()
['fr_FR', 'ISO8859-1']

You could run zope's python at the command line and try some of the above to see what you get.

Locale alias for french under windows --FoeNyx?, Thu, 20 May 2004 15:35:48 -0700 reply

When looking into of python there are 2 lists of locales aliases in the windows locales list the correct alias for french seems to be "fr_FR"

presumed fixed --simon, Fri, 21 May 2004 19:48:16 -0700 reply

So your fix is to use locale 'fr_FR', not 'french', on windows. Thanks for the help Foenyx.

property change --simon, Fri, 21 May 2004 19:48:33 -0700 reply

Status: open => closed

fr_FR doesn't work for me --Fri, 21 Jan 2005 12:46:24 -0800 reply

I have the same bug fr_FR as locale in zope.conf stops zope form starting... french is the right thing to use under windows... this is what fr_FR does: Plone Controller - [Plone status]? : pythonw.exe - Application Error The instruction at "0x009d3f09" referenced memory at "0x00000070". The memory could not read ...

still exists with 0.38 --Mon, 21 Feb 2005 06:20:20 -0800 reply

Status: closed => open

I tried to install ZWiki 0.38 and all I got was this traceback:

2005-02-14T10:17:43 ERROR(200) Zope Could not import Products.ZWiki
Traceback (most recent call last):
  File "C:\Programme\Zope-2.7.0\lib\python\OFS\", line 654, in import_product
    product=__import__(pname, global_dict, global_dict, silly)
  File "D:\DATA\Zope\instances\Products\ZWiki\", line 12, in ?
    import ZWikiPage, ZWikiWeb, Permissions, Defaults
  File "D:\DATA\Zope\instances\Products\ZWiki\", line 76, in ?
    from Admin import AdminSupport
  File "D:\DATA\Zope\instances\Products\ZWiki\", line 18, in ?
    from pagetypes import PAGE_TYPE_UPGRADES
  File "D:\DATA\Zope\instances\Products\ZWiki\pagetypes\", line 132, in ?
    __import__('Products.ZWiki.pagetypes.%s' % file)
  File "D:\DATA\Zope\instances\Products\ZWiki\pagetypes\", line 11, in ?
    from moin_support import render_moin_markup
  File "D:\DATA\Zope\instances\Products\ZWiki\pagetypes\", line 40, in ?
    class Parser:
  File "D:\DATA\Zope\instances\Products\ZWiki\pagetypes\", line 64, in Parser
    word_rule =

ur'(?:(?<[%(l)s])|^)%(parent)s(?:%(subpages)s(?:[%(u)s]?[%(l)s]?+){2,})+(?[%(u)s%(l)s]+)' % {

LookupError?: unknown encoding: 1252

-- ArnoPucher

fr_FR doesn't work for me --simon, Tue, 01 Mar 2005 22:25:04 -0800 reply

> pythonw.exe - Application Error The instruction at "0x009d3f09" referenced memory at "0x00000070"

This is a python issue, best handled in the python bug tracker or list.

still exists with 0.38 --simon, Tue, 01 Mar 2005 22:28:41 -0800 reply

This is an issue with the regular expressions in the moin page type; they need to be made i18n-safe somehow, like the ones in I don't know how right now, patches welcome. A workaround: move the ZWiki/pagetypes/moin* files out of the way and restart zope.

the moin regexps --simon, Thu, 01 Sep 2005 15:36:30 -0700 reply

I've opened [#1148 moin markup support doesn't work in some locales]? to discuss that.

closing --simon, Thu, 01 Sep 2005 16:48:09 -0700 reply

Status: open => closed

#1148 now affects only the moin page type, not the whole Zwiki installation. I believe this issue is now closed, if you can reproduce a Zwiki startup failure due to UnicodeDecodeError? please reopen.

... --betabug, Wed, 21 Feb 2007 08:30:44 +0000 reply

Name: '#809 rahal' => '#809 UnicodeDecodeError? prevents installation' Category: admin-configuring => admin-installing