[Zope] Re: problem with input elements and unicode/utf-8

Jostein Leira jleira at yahoo.com
Mon Feb 19 15:29:34 EST 2007


Dieter, Andreas and Daryl
   
  Here comes a detailed description of a new Zope-installation I just made on a new Debian (testing) machine. Here are the steps to reproduce my problem. (I'm still not sure it is a problem other than me not understanding how this should work).
   
  Downloading Zope
wget http://www.zope.org/Products/Zope/2.10.2/Zope-2.10.2.tgz
tar -xzvf Zope-2.10.2.tgz
  cd Zope-2.10.2-final
   ./configure --prefix=/usr/local/zope
  make
  sudo make install
  sudo ./usr/local/zope/bin/mkzopeinstance.py
  /usr/local$ sudo chown -R zope.zope zope
/usr/local$ sudo chown -R zope.zope zopeinst
  sudo jed /usr/local/zopeinst/etc/zope.conf
<-- set effective-user zope
  leira:/usr/local/zopeinst/bin# sudo ./runzope
  Logging in to ZMI directly to port 8080 I add a new Page Template. 
  If the page template contains only 
   
      hei på deg
   
  it saves OK and runs OK.
   
  If it contains either of the tal-lines below I get the following error message:
   
     <div tal:content="python:unicode('hei på deg','utf8')" />
   
  Compilation failed
exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 33: ordinal not in range(128)
   
     <div tal:content="python:u'hei på deg'" />
   
  Compilation failed
exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 26: ordinal not in range(128)
   
     <div tal:content="python:'hei på deg'" />
   
  Compilation failed
exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 25: ordinal not in range(128)
   
  In this test I have used IE6 (and it is not passing HTTP_ACCEPT_CHARSET in the request).
   
  By the way: The character 'å' has value 0xe5 in iso-8859-1.
   
  Should the above tal-statements have worked? I have done no other configuration on the zope-instances than stated here but are consistant with my problems on another installation at work.

  Regards Jost

 
---------------------------------
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070219/3ae2c798/attachment.htm


More information about the Zope mailing list