Modify

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#8459 closed defect (duplicate)

error under Japanese environment

Reported by: okamototk Owned by: takanorig
Priority: high Component: WorkflowEditorPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description

Thansk for nice plugin.

I tried workfloweditor with trac0.12 and ubuntu. Then encording error occured.

Use utf-8 instead of internal encoding fixed this problem.

diff -r 9647cfe2514c resource/plugins/workfloweditorplugin/workfloweditor/workfloweditor_admin.py
--- a/resource/plugins/workfloweditorplugin/workfloweditor/workfloweditor_admin.py      Sun Jan 30 09:10:20 2011 +0900
+++ b/resource/plugins/workfloweditorplugin/workfloweditor/workfloweditor_admin.py      Wed Feb 02 07:48:41 2011 +0900
@@ -118,7 +118,7 @@
         stream = template.generate()
         default_config = stream.render('text')
         
-        page_param['workflow_default_config'] = default_config
+        page_param['workflow_default_config'] = default_config.decode('utf-8')
 
 
 class WorkflowChangeHandler(Component):

best reagards,

Takaashi Okamoto

Attachments (0)

Change History (7)

comment:1 follow-up: Changed 4 years ago by okamototk

  • Resolution set to invalid
  • Status changed from new to closed

Sorry, I lost sitecustomize.py configuration for ubuntu.

When I add following description at /etc/python2.6/sitecustomize.py,
workfloweditorplugin work fine.

import sys, os
sys.setdefaultencoding("utf8")

best regards,

Takashi Okamoto

comment:2 in reply to: ↑ 1 Changed 4 years ago by jun66j5

Replying to okamototk:

Sorry, I lost sitecustomize.py configuration for ubuntu.

When I add following description at /etc/python2.6/sitecustomize.py,
workfloweditorplugin work fine.

The user must change sitecustomize.py? I think that it is not good.

The same issue has been reported. I have posted the another patch. comment:ticket:5901:1.

comment:3 Changed 4 years ago by rjollos

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:4 Changed 4 years ago by rjollos

  • Resolution set to duplicate
  • Status changed from reopened to closed

comment:5 Changed 3 years ago by rjollos

I'm going to apply the patch in #5901, but I'm having trouble reproducing the issue, so if someone can send the specific workflow test that reproduces the error, that would be a big help. Please test the latest checkin as well.

comment:6 Changed 3 years ago by rjollos

(In [9976]) Fixed UnicodeDecode error. Thanks to jun66j5 for the patch. Refs #5901, #8459.

comment:7 Changed 3 years ago by rjollos

(In [9977]) Merge [9976] into 0.11 branch. Fixes #5901. Refs #8459.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.