Modify

Opened 12 years ago

Closed 12 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 12 years ago by bas

  • Status changed from new to assigned

can you attach or send me an example email messaage that trigger this?

comment:2 Changed 12 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 12 years ago by bas

Thanks this is a bug. I will fix it and you solution is oke

comment:4 Changed 12 years ago by bas

  • Milestone set to 0.90
  • Version changed from 0.80 to trunk

comment:5 Changed 12 years ago by bas

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

see changeset [274]

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
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.