problems with mimify.mime_encode_header

Discussion in 'Python' started by Egor Duda, Jun 29, 2006.

  1. Egor Duda

    Egor Duda Guest

    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
     
    Egor Duda, Jun 29, 2006
    #1
    1. Advertising

  2. In <>, Egor Duda
    wrote:

    > #!/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
     
    Marc 'BlackJack' Rintsch, Jun 29, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Srinivas Kanakapally [MSFT]

    RE: Vs.net Server Explorer Diagram Problems

    Srinivas Kanakapally [MSFT], Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    3,042
    Srinivas Kanakapally [MSFT]
    Jul 8, 2003
  2. =?iso-8859-1?q?Ilpo_Nyyss=F6nen?=

    email package vs. mimify.mime_encode_header

    =?iso-8859-1?q?Ilpo_Nyyss=F6nen?=, Oct 11, 2003, in forum: Python
    Replies:
    8
    Views:
    353
    Tim Roberts
    Oct 21, 2003
  3. Susan Baker
    Replies:
    2
    Views:
    865
    kelvSYC
    Jun 26, 2005
  4. Shelly

    Problems, problems for newbie

    Shelly, Sep 2, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    2,246
    Shelly
    Sep 3, 2007
  5. Sak Na rede
    Replies:
    0
    Views:
    445
    Sak Na rede
    Jan 30, 2009
Loading...

Share This Page