IMAP UTF-7, any codec for that anywhere?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Max M

    IMAP UTF-7, any codec for that anywhere?

    Is there any codec available for handling The special UTF-7 codec for IMAP?

    I have searched the web for info, but there only seem to be discussions
    about it. Not actual implementations .

    This is what I am talking about:


    5.1.3. Mailbox International Naming Convention

    --

    hilsen/regards Max M, Denmark


    IT's Mad Science
  • Brian Quinlan

    #2
    Re: IMAP UTF-7, any codec for that anywhere?

    Max M wrote:[color=blue]
    > Is there any codec available for handling The special UTF-7 codec for IMAP?
    >
    > I have searched the web for info, but there only seem to be discussions
    > about it. Not actual implementations .[/color]

    Is there something special do you need or is recipe OK?
    [color=blue][color=green][color=darkred]
    >>> u"\u00ff".encod e('utf-7')[/color][/color][/color]
    '+AP8-'


    Cheers,
    Brian

    Comment

    • Max M

      #3
      Re: IMAP UTF-7, any codec for that anywhere?

      Brian Quinlan wrote:[color=blue]
      > Max M wrote:
      >[color=green]
      >> Is there any codec available for handling The special UTF-7 codec for
      >> IMAP?[/color][/color]
      [color=blue]
      > Is there something special do you need or is recipe OK?
      >[color=green][color=darkred]
      > >>> u"\u00ff".encod e('utf-7')[/color][/color]
      > '+AP8-'[/color]


      A recipe would be excellent. Unfortunately yours is no right. It should
      have looke like:
      [color=blue][color=green][color=darkred]
      >>> imapUTF7Encode( u"\u00ff")[/color][/color][/color]
      '&AP8-'

      I believe you missed the 'special' in "The special UTF-7 codec for IMAP?"

      Imap folders use a non-standard version of utf-7, where some characters
      are different.

      I found som messages from 2001 on the net between a few Python unicode
      developers, where they discuss implementing it. But I cannot find an
      implementation anywhere.

      I found a perl module that converts to/from the codec, but as usual that
      is regex hell. Well ok its not that difficult, but I still need to think
      to hard to parse Perl regex'

      --

      hilsen/regards Max M, Denmark


      IT's Mad Science

      Comment

      Working...