Opened 2 years ago

Closed 2 years ago

Last modified 5 months ago

#10126 closed defect (fixed)

dynfields.html produce Genshi UnicodeDecodeError with localized ticket type

Reported by: bsavelev Owned by: robguttman
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords: patch UnicodeDecodeError
Cc: Trac Release: 0.12


I use trac 0.12 and TracDynamicFields-1.2.3-py2.6 from latest svn/0.11

I have 2 ticket type in ru_RU.utf-8 locale:


When trac try to render dynfields.html its generate http 500 error with 'Genshi UnicodeDecodeError exception'

Attachments (0)

Change History (10)

comment:1 Changed 2 years ago by bsavelev


due_date = text = true
due_date.date_empty = true
due_date.label = Срок исполнения
due_date.show_when_type = задача
due_date.value =

comment:2 Changed 2 years ago by bsavelev

  • Trac Release changed from 0.11 to 0.12

comment:3 Changed 2 years ago by bsavelev

  • Keywords patch added
---    (revision 11696)
+++    (working copy)
@@ -229,6 +229,7 @@
         return None
     def update_spec(self, req, key, opts, spec):
+        from trac.util.text import to_unicode
         target = spec['target']
         trigger = spec['trigger']
@@ -237,7 +238,7 @@
         match = spec_re.match(key)
         if match:
             spec['op'] = match.groupdict()['op']
-            spec['trigger_value'] = opts[key]
+            spec['trigger_value'] = to_unicode(opts[key])
             spec['hide_always'] = \
                 str(self._is_always_hidden(req, key, opts, spec)).lower()
         else: # assume 'hide_always' or group rule

this patch works for me

comment:4 Changed 2 years ago by AdrianFritz

  • Keywords UnicodeDecodeError added

comment:5 Changed 2 years ago by robguttman

  • Status changed from new to assigned

bsavelev, thanks for these details and the patch. I will do some testing myself.

Question: is this unicode support sufficient for your needs or do you also need the internationalization support found in the (unmaintained) 0.12 branch of this plugin?

comment:6 Changed 2 years ago by bsavelev

thanks for plugin)

A: i18n is always good. I think the problem is not just me. it may relate to any who have non-ASCII types of tickets

comment:7 Changed 2 years ago by robguttman

(In [11699]) refs #10126: support unicode characters in trac.ini config.

comment:8 Changed 2 years ago by robguttman

  • Resolution set to fixed
  • Status changed from assigned to closed

This should be fixed now.

Parsing trac.ini directly to support case sensitivity (a fix I made last week) ended up breaking the unicode support that's built-in to Trac's config parser..

comment:9 Changed 14 months ago by rjollos

See also #10476 for a problem caused by [11655].

comment:10 Changed 5 months ago by rjollos

In 13650:

Bump version to 1.2.4. Refs #11378, #11118, #11523, #10126, #9605, #9986, #9996, #8971.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from robguttman. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.