problems with mimify.mime_encode_header

E

Egor Duda

I'm trying to use mimify module and have a problem with
mime_encode_header function. Below is the testcase

#!/usr/bin/python
# -*- coding: utf-8 -*-

import mimify

mimify.CHARSET = 'utf-8'

print mimify.mime_encode_header('Subject: теÑÑ‚ а.\n');

Тhe output is:
Subject: =?utf-8?Q?=D1=82=D0=B5=D1=81=D1=82?= а.

Please note that the last character (before dot) is not quoted, and
resulting string is not 8bit clean.

Is it incorrect behavior, or i'm calling mime_encode_header in a way
it's not supposed to be called?

egor
 
M

Marc 'BlackJack' Rintsch

Egor Duda said:
#!/usr/bin/python
# -*- coding: utf-8 -*-

import mimify

mimify.CHARSET = 'utf-8'

print mimify.mime_encode_header('Subject: теÑÑ‚ а.\n');

Тhe output is:
Subject: =?utf-8?Q?=D1=82=D0=B5=D1=81=D1=82?= а.

Please note that the last character (before dot) is not quoted, and
resulting string is not 8bit clean.

Why should a simple ASCII 'a' be quoted? And what do you mean by "not
8bit clean"? The string is even 7-bit clean!

Ciao,
Marc 'BlackJack' Rintsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top