Hi,

The trac notification mails which contain east asia characters (CJK)
are not formatted well.
I think it's because  east asia characters occupy double width of
normal characters, but notification mail formatter has not taken these
into account.

The notification mail looks like:

------------------------+---------------------------------------------------
  Reporter:  lidaobing  |       Owner:  lijian
      Type:  里程碑任务      |      Status:  assigned
 Component:  网站认证       |    Severity:  重要不紧急
Resolution:             |    Keywords:
   Duetime:  4h         |       Stage:  Todo
------------------------+---------------------------------------------------

and it should be:
------------------------+---------------------------------------------------
  Reporter:  lidaobing  |       Owner:  lijian
      Type:  里程碑任务 |      Status:  assigned
 Component:  网站认证   |    Severity:  重要不紧急
Resolution:             |    Keywords:
   Duetime:  4h         |       Stage:  Todo
------------------------+---------------------------------------------------

I have make a patch to
http://svn.edgewall.com/repos/trac/tags/trac-0.10.4/trac/ticket/notification.py(r7093).
See the attachment.
The patch uses function unicodedata.east_asian_width() to detect all
double width characters.

If this is a bug, should I create a ticket for it?

Regards,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: notification.r7093.diff
Description: Binary data

Reply via email to