problems with mimify.mime_encode_header

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Egor Duda

    problems with mimify.mime_encode_header

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

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

    import mimify

    mimify.CHARSET = 'utf-8'

    print mimify.mime_enc ode_header('Sub ject: тест а.\n');

    Тhe output is:
    Subject: =?utf-8?Q?=D1=82=D0=B 5=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_hea der in a way
    it's not supposed to be called?

    egor
  • Marc 'BlackJack' Rintsch

    #2
    Re: problems with mimify.mime_enc ode_header

    In <mailman.7617.1 151590377.27775 .python-list@python.org >, Egor Duda
    wrote:
    [color=blue]
    > #!/usr/bin/python
    > # -*- coding: utf-8 -*-
    >
    > import mimify
    >
    > mimify.CHARSET = 'utf-8'
    >
    > print mimify.mime_enc ode_header('Sub ject: тест а.\n');
    >
    > Тhe output is:
    > Subject: =?utf-8?Q?=D1=82=D0=B 5=D1=81=D1=82?= а.
    >
    > Please note that the last character (before dot) is not quoted, and
    > resulting string is not 8bit clean.[/color]

    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

    Comment

    Working...