Hi all.

There have been a number of problems migrating old Plone sites using a different default_encoding than utf-8 (for example iso-8859-1).

I have now written a small script that should help in the encoding migration. You can get it from http://svn.plone.org/svn/plone/CMFPlone/branches/2.1/Extensions/convertToUTF8.py or wait on the next bug fix release of Plone (scheduled for late December 2005) where it will be included.

Please be sure to make a backup of your site before using it!

Using it is quite simple:

After you have migrated your site to Plone 2.1 make sure the default_encoding (found in the ZMI /portal_properties/site_properties) is still set to your old encoding.

In the ZMI go to the root of your Plone site and add an 'External method'. Fill in the following:

id=convert
Title=convert
Module Name=CMFPlone.convertToUTF8
Function Name=convert

The id and title don't matter, so use something else if it the id is already in use. Next go to the external method and click on the 'Test' tab. After a short time (depending on the number of content objects) you should see a 'Sucess! xx objects converted.' message.

Check the default_encoding again. It should be utf-8 now. Verify that all went well by browsing your site.

I'm interessted in all kind of comments and questions. Don't hesitate to ask ;)

Hanno

_______________________________________________
Setup mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/setup

Reply via email to