Thanks, but this prevents the server to start up at all giving me an UnicodeDecodeError.

I reported it as a bug so maybe you wanna comment there: 
http://dev.plone.org/plone/ticket/8776

Cheers,
Martin


Am 05.12.2008 um 16:06 schrieb Tom Lazar:

i've had the same experience but didn't spend much time investigating it. my guess is, that it's because the description field is part of the dublin core.

i further suspect that there's the same bug in the way the description field deals with unicode that i myself have produced in my own code time and again, namely forgetting the difference between utf-8 and unicode...

try

description=_(u"Straße des Partners".encode('utf-8'))

untested, hth,

tom

On 04.12.2008, at 17:36, Martin Stadler wrote:

Hi!

A special chars problem, again...

So I'm working on this content type being a subclass of ATFolder. In the schema I want to use umlauts in the label and description of the widgets (type of widget isn't changing anything). I added

  # -*- coding: utf-8 -*-

at the beginning of the .py file. When I use special chars for the label everything works fine. For the description it throws an UnicodeEncodeError.

I'm confused because I don't understand why label and description behave differently. This seems to be a Plone bug but it's so obvious, am I missing something?

I'm using Plone 3.1.7.

Here"s a snippet:

  atapi.StringField('street', required=False, searchable=True,
      storage=atapi.AnnotationStorage(),
widget=atapi.StringWidget(label=_(u"Straße"), description=_(u"Straße des Partners"))),

Thanks!
Martin
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers





_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to