#56 — quills needs to handle UTF-8

StateResolved
Version: 1.5-alpha1
AreaFunctionality
Issue typeBug
SeverityMedium
Submitted by(anonymous)
Submitted onAug 18, 2006
Responsible
Target release: 1.5
Return to tracker
Last modified on Jan 08, 2009 by Matthew Wilkes


While trying to install on Plone 2.1, an instance with lots of UTF-8 text:

2006-08-18 20:33:26
failed:
Traceback (most recent call last):
 
  File "/home/np/local/var/zope/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 311, in installProduct
    res=install(portal)
 
  File "/home/np/local/zope-2.8.1/lib/python/Products/ExternalMethod/ExternalMethod.py", line 225, in __call__
    try: return f(*args, **kw)
 
  File "/home/np/local/var/zope/Products/Quills/Extensions/Install.py", line 97, in install
    automigrate(self, out)
 
  File "/home/np/local/var/zope/Products/Quills/Extensions/Install.py", line 207, in automigrate
    migration.migrate()
 
  File "/home/np/local/var/zope/Products/Quills/migrations/quills09to15.py", line 57, in migrate
    self.migrateWeblog(weblog.getObject())
 
  File "/home/np/local/var/zope/Products/Quills/migrations/quills09to15.py", line 74, in migrateWeblog
    print >> self.out, \
 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
 
=============
2006-08-15 11:11:36
failed:
Traceback (most recent call last):
 
  File "/home/np/local/var/zope/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 311, in installProduct
    res=install(portal)
 
  File "/home/np/local/zope-2.8.1/lib/python/Products/ExternalMethod/ExternalMethod.py", line 225, in __call__
    try: return f(*args, **kw)
 
  File "/home/np/local/var/zope/Products/Quills/Extensions/Install.py", line 97, in install
    automigrate(self, out)
 
  File "/home/np/local/var/zope/Products/Quills/Extensions/Install.py", line 207, in automigrate
    migration.migrate()
 
  File "/home/np/local/var/zope/Products/Quills/migrations/quills09to15.py", line 57, in migrate
    self.migrateWeblog(weblog.getObject())
 
  File "/home/np/local/var/zope/Products/Quills/migrations/quills09to15.py", line 74, in migrateWeblog
    print >> self.out, \
 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
 
=============
2006-08-12 18:48:13
uninstalled
Successfully uninstalled Quills.
 
=============
2006-08-12 18:46:10
Installed Quills Workflow
Set quills_workflow as default for WeblogEntry
Successfully installed Quills.
 
=============
2006-08-12 18:46:07
uninstalled
Successfully uninstalled Quills.
 
=============
2006-03-10 18:52:14
Installed Quills Workflow
Set quills_workflow as default for WeblogEntry
Successfully installed Quills.
 
=============
2006-03-10 18:51:14
uninstalled
 
=============
2005-09-08 23:00:50
Installed Quills Workflow
Set quills_workflow as default for WeblogEntry
Successfully installed Quills.
 
=============
2005-09-08 20:58:28
uninstalled
Successfully uninstalled Quills.
 
=============
2005-08-28 18:51:46
Installed Quills Workflow
Set quills_workflow as default for WeblogEntry
Successfully installed Quills.
 
=============
2005-08-27 02:40:11
uninstalled
Successfully uninstalled Quills.
 
=============
2005-08-27 02:31:50
Installed Quills Workflow
Set quills_workflow as default for WeblogEntry
Successfully installed Quills.
 
=============
2005-08-27 02:17:35
uninstalled
Successfully uninstalled Quills.
 
=============
2005-08-27 01:56:39
Installed Quills Workflow
Set quills_workflow as default for WeblogEntry
Successfully installed Quills.
Added by(anonymous)onAug 21, 2006 01:43 AM
Target release: 1.5None
if you are zope 2.8

you may try to add

a file call sitecustomize.py with 2 line below in /Zope-X.x/lib/python

-------------
import sys
sys.setdefaultencoding("utf-8")
-------------

then restart zope , it may fix your problem
Added byJustin RyanonAug 21, 2006 02:54 AM
Setting the default encoding to utf-8 will not solve your problem, it will only sidestep it, don't do this, we probably need to fix something.
Added byTim HicksonAug 21, 2006 12:19 PM
Issue state: unconfirmedopen
Target release: None1.5
Can you retry the migration with an svn checkout of the trunk. I just made a change that I hope will fix the issue: http://dev.plone.org/collective/changeset/29068 .
Added byTim HicksonAug 21, 2006 04:41 PM
Issue state: openresolved
The change shown above didn't fix this, but we've got there in the end!

No responses can be added.