On Thu, Dec 22, 2011 at 12:44 PM, mcelotti <[email protected]> wrote: > I have a Document (type_name=Document) containing this text: > "accents è à ì ò ù" > > When I open the doc everything is fine and all the accents are correct. > > The problem comes with my custom script: > > items = context.portal_catalog(portal_type='Document', > UID='a64ce6ceb295bcaa48ebff874379d907') > array=[] > for item in items: > dict={} > obj = item.getObject() > dict['text']= obj.getText() > array.append(dict) > return array > > The output is: > "accents \xc3\xa8 \xc3\xa0 \xc3\xac \xc3\xb2 \xc3\xb9" > > I need to write original content to database (mysql utf-8) but I'm stuck > with this problem ... >
http://collective-docs.readthedocs.org/en/latest/troubleshooting/unicode.html All Archetypes accessor methods (should) return UTF-8 bytecode strings. -- Mikko Ohtamaa http://opensourcehacker.com http://twitter.com/moo9000 _______________________________________________ Product-Developers mailing list [email protected] https://lists.plone.org/mailman/listinfo/plone-product-developers
