Opened 14 years ago
Closed 14 years ago
#144 closed defect (fixed)
Better Unicode support
Reported by: | trumbitta@… | Owned by: | bas |
---|---|---|---|
Priority: | major | Milestone: | 0.90 |
Component: | email2trac | Version: | trunk |
Keywords: | Cc: |
Description
When a non-ASCII character is in the description, the message will not be parsed and the script will exit.
I'll try to fix this figuring out where to put a .encode('utf-8') but I'm not a python programmer...
I guess this is a problem wich not only affects the description, but also other fields.
You can easily check by adding an è somewhere in the description of a ticket.
Attachments (0)
Change History (5)
comment:1 Changed 14 years ago by bas
- Status changed from new to assigned
comment:2 Changed 14 years ago by trumbitta@…
This is one of the messages I used for my tests
Subject: Probe unicode #?owner=agile,milestone=milestone2,version=1.0 è_é é_è
I finally managed to make it work by enabling debug mode in email2trac.conf and adding the following in debug_body:
if not message_body: message_body = '(None)' # for UNICODE message_body = message_body.encode('utf-8') # end of the additional code fx.write(message_body)
I wonder if there is a better solution :)
comment:3 Changed 14 years ago by bas
Thanks this is a bug. I will fix it and you solution is oke
comment:4 Changed 14 years ago by bas
- Milestone set to 0.90
- Version changed from 0.80 to trunk
comment:5 Changed 14 years ago by bas
- Resolution set to fixed
- Status changed from assigned to closed
see changeset [274]
can you attach or send me an example email messaage that trigger this?