[Zope] unicode problem

Maurits van Rees maurits at vanrees.org
Wed Nov 30 17:35:09 EST 2005


On Wed, Nov 30, 2005 at 02:12:07PM +0100, abraham.peter at freestart.hu wrote:


> I've created a folder a put some dtml-methods, External python
> scripts and a Formulator Forms. It had worked fine till I put the
> Form's xml page the following line:
> <action>int_bev_feldolgoz</action>
> int_bev_feldolgoz is dtml method and at the moment only shows the
> value of REQUEST
> Having seen the result of this method I wanted to back to edit the
> content of the folder, but I couldn't continue. The following error
> message was displayed:
> Error Type: UnicodeEncodeError
> Error Value: 'latin-1' codec can't encode character u'\u0170' in position 22895: ordinal not in range(256)
> 
> What shall I do? I don't want start it from scratch. All dtml-method
> with unicode characters worked smoothly. (Debian Sarge Zope2.7)

I had an issue with unicode a few weeks back and could solve it thanks
to the list, so it might help you to review this thread:

http://mail.zope.org/pipermail/zope/2005-September/161900.html

Partly that thread is about (Re)StructuredText, but don't let yourself
be thrown off by that.

You may want to check if your Python scripts do some explicit unicode
encoding, like this:

sometext = unicode(some_other_text,'iso-8859-1').encode('utf-8')

And you may have to change your Python's default encoding or have a
look at etc/zope.conf in your zope instance.

HTH,

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
"Make no little plans; they have no magic to stir men's blood and
probably in themselves will not be realized. Make big plans."
---Daniel Hudson Burnham.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope/attachments/20051130/a2653a79/attachment.bin


More information about the Zope mailing list