Roundup Tracker - Issues

Issue 2550787

classification
RegExp with non-ASCII word (start of an original message)
Type: behavior Severity: normal
Components: Mail interface Versions: 1.4
process
Status: closed invalid
:
: : anthonybaxter, ber, dman13, dubois, jerome, richard, rochecompaan, schlatterbeck
Priority: :

Created on 2013-01-11 06:05 by jerome, last changed 2013-01-12 20:27 by ber.

Messages
msg4748 Author: [hidden] (jerome) Date: 2013-01-11 06:05
Dear Sirs



I need your help~~~



It does not work when i configued the confi.ini, changed as below

# Regular expression matching start of an original message

# if quoted the in body.

# Value is Python Regular Expression (UTF8-encoded).

# Default: ^[>|\s]*-----\s?Original Message\s?-----$

#origmsg_re = ^[>|\s]*-----\s?Original Message\s?-----$

origmsg_re = ^[>|\s]*-----\s?(Original\ Message|邮件原件)\s?-----$





just add chinese character and the encode is utf-8

the client's(MS outlook) language is english,it will work.if chinese, 
it does't work.



could you tell me where the problem is?

aprreciation your infromation

thanks



Jerome
msg4749 Author: [hidden] (jerome) Date: 2013-01-11 06:14
sorry, add more



origmsg_re = ^[>|\s]*-----\s?(Original\ Message|邮件原件)\s?-----$



It will work normally if i change Chinese character to English, it 
seems like RE is ok.
msg4751 Author: [hidden] (ber) Date: 2013-01-11 10:28
Hi Jerome,
if you want to debug this yourself, try to add some print
or logging statements to roundup/mailgw.py like
  print repr(original_msg)
to see what is going one.

Otherwise can you try to create something that is more reproducable?
Using some encoding for the Chinese characters 
and the email you are trying it with?
So it can be entered within python code in ascii so we call can be sure
that we are using excately the same bytes...
msg4752 Author: [hidden] (jerome) Date: 2013-01-12 04:31
Changed the title.

Thanks, Ber!

We are not familiar with python, will try to learn how to debug as you 
said, we will reply here if we find something.
msg4753 Author: [hidden] (jerome) Date: 2013-01-12 17:55
Issue solved!

How careless we are! We should notice this statement line:
# Value is Python Regular Expression (UTF8-encoded).

what we do is changing the word "邮件原件" to the UTF-8 code of it.

>>> print repr('邮件原件')
'\xe9\x82\xae\xe4\xbb\xb6\xe5\x8e\x9f\xe4\xbb\xb6'

so, the line in the configuration file is below, it works!

origmsg_re = ^[>|\s]*-----\s?(Original\ Message|\xe9\x82\xae\xe4\xbb\xb6
\xe5\x8e\x9f\xe4\xbb\xb6)\s?-----$
msg4754 Author: [hidden] (ber) Date: 2013-01-12 20:27
Hi Jerome,
ah, good to know you got it sorted out.
This is why I was asking for a python code representation of your
configuration and email, because it makes it unique. :)

If you have fun with roundup and you enjoy our community,
we appreciate any report about your experiences, e.g. on
our users list.

Regards,
Bernhard
History
Date User Action Args
2013-01-12 20:27:09bersetstatus: new -> closed
resolution: invalid
messages: + msg4754
2013-01-12 17:55:57jeromesetmessages: + msg4753
2013-01-12 04:31:48jeromesetmessages: + msg4752
title: roundup mail forward issue mail -> RegExp with non-ASCII word (start of an original message)
2013-01-11 10:28:05bersetnosy: + ber
messages: + msg4751
2013-01-11 06:14:40jeromesetmessages: + msg4749
2013-01-11 06:05:49jeromecreate