You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
email/charset.py has convert() function to incorporate
using different charset for input and output for a
language like Japanese. Because the email user agent
in Japan frequently use characters outside the range of
legitimate JIS charset, these messages are shunted in
mailman delivery. Here is a patch to handle this case
by replacing the characters by '?' using the 'errors'
parameter in unicode/encode functions.
This patch includes the unicode string conversion patch
in bpo-1368247.
Do you have a test case for this? bpo-1368247 includes one just
for the encoding of unicode strings, but not for the error
argument. If you can include a simple test case, then I'll
add this patch.
tkikuchi commented on Mar 13, 2006
tkikuchimannequin
MannequinAuthor
More actions
Logged In: YES
user_id=67709
Thanks! Here is an example program which fails on 4.0a
without the patch.
loewis commented on Mar 5, 2007
loewismannequin
Mannequin
More actions
I'm -1 on this patch as-is. It changes the default error handling behavior from 'strict' to 'replace', for this method. This is a choice that the caller of these methods should make, so I think the default value for the error handling should be 'strict'. If then it is meaningful in mailman to set this to 'replace', this is mailman's choice. Python should never, on its own, create moji-bake.
If you revise this patch, please provide the test case as a patch to Lib/email/test somehow (probably patching both test_email and test_email_renamed).
tkikuchi commented on Mar 13, 2007
tkikuchimannequin
MannequinAuthor
More actions
Ok, I worked a little on the code to propagate the choice of 'strict' or 'replace' but there are many we should fix. And we should fix the application, mailman, also. The problem is only related to Japanese and we'd rather find workarounds elsewhere. I put the priority of this patch lowest. Thanks for your comments.
Activity
tkikuchi commentedon Mar 6, 2006
email/charset.py has convert() function to incorporate
using different charset for input and output for a
language like Japanese. Because the email user agent
in Japan frequently use characters outside the range of
legitimate JIS charset, these messages are shunted in
mailman delivery. Here is a patch to handle this case
by replacing the characters by '?' using the 'errors'
parameter in unicode/encode functions.
This patch includes the unicode string conversion patch
in bpo-1368247.
warsaw commentedon Mar 12, 2006
Logged In: YES
user_id=12800
Do you have a test case for this? bpo-1368247 includes one just
for the encoding of unicode strings, but not for the error
argument. If you can include a simple test case, then I'll
add this patch.
tkikuchi commentedon Mar 13, 2006
Logged In: YES
user_id=67709
Thanks! Here is an example program which fails on 4.0a
without the patch.
loewis commentedon Mar 5, 2007
I'm -1 on this patch as-is. It changes the default error handling behavior from 'strict' to 'replace', for this method. This is a choice that the caller of these methods should make, so I think the default value for the error handling should be 'strict'. If then it is meaningful in mailman to set this to 'replace', this is mailman's choice. Python should never, on its own, create moji-bake.
If you revise this patch, please provide the test case as a patch to Lib/email/test somehow (probably patching both test_email and test_email_renamed).
tkikuchi commentedon Mar 13, 2007
Ok, I worked a little on the code to propagate the choice of 'strict' or 'replace' but there are many we should fix. And we should fix the application, mailman, also. The problem is only related to Japanese and we'd rather find workarounds elsewhere. I put the priority of this patch lowest. Thanks for your comments.
vstinner commentedon Jul 29, 2019
This issue is not newcomer friendly, I remove the easy keyword.