Submitted by : 192.168.1.21 at: 2004-02-19T05:50:42+00:00 (13 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

If I make a WikiWord? link wich includes a non latin-1 character, zwiki stops at the first character like ő, ű It will not render the word HőSzivattú as a link, and words like HulladékHő will be rendered as HulladékH?ő.

using Zwiki 0.27.1 with Zope 2.7.0 and Plone 2.0-RC3 with UTF-8 encoding

property change --SimonMichael, Thu, 19 Feb 2004 17:21:07 -0800 reply

Severity: serious => normal

check locale --SimonMichael, Thu, 19 Feb 2004 17:24:21 -0800 reply

This should work if your server's locale is set correctly. If no locale is set for python, Zwiki will recognize a default set of characters that don't include latin-2 at present. See the comments in http://zwiki.org/zwikidir/Regexps.py . Does that help ?

locale changed to hu_HU.UTF-8 --Fri, 20 Feb 2004 03:13:19 -0800 reply

I set the locale in zope.conf to hu_HU.UTF-8, but after restarting Zope, the ZWiki product became broken. Traceback:

File "/usr/local/Zope-2.7.0/lib/python/OFS/Application.py", line 654, in import_product
  product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/fenntarthato.hu/Products/ZWiki/__init__.py", line 10, in ?
  import ZWikiPage, ZWikiWeb, Permissions, Defaults
File "/usr/local/fenntarthato.hu/Products/ZWiki/ZWikiPage.py", line 63, in ?
  from Regexps import url, bracketedexpr, doublebracketedexpr, \
File "/usr/local/fenntarthato.hu/Products/ZWiki/Regexps.py", line 70, in ?
  U='|'.join([x.encode('utf8') for x in unicode(string.uppercase,encoding)])
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 26-27: invalid data

So, what should I do? (anyway, thanks for your help)

locale changed to hu_HU.UTF-8 --SimonMichael, Fri, 20 Feb 2004 13:18:51 -0800 reply

I'm not sure. :/

It seems that with the locale and encoding you have configured there, string.uppercase contains characters that unicode () can't decode. This seems wrong.. python bug ? Wrong locale/encoding value ?

You might play with this at a python prompt - look at string.uppercase and try to find the character(s) in it that are causing the trouble. As a workaround you could hard-code a string at line 70 that excludes the problem chars. Let us know how it goes.

Thank you for the InternationalCharacterExamples information, very helpful.

doubles? --betabug, Sun, 05 Aug 2007 04:48:53 -0700 reply

I believe #886 #714 and #679 are all the same problem.