base64 decode - problem with special characters

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

    #1

    base64 decode - problem with special characters

    Hi...

    I have a problem with Mime/base64 decoding. Maybe someone can help. I have
    an original Text, that I send using outlook. The text is: "This is a
    testmail ä ü ö é à è" (without the ")

    So on the mailserver I open the message and the body is base64 encoded and
    contains
    VGhpcyBpcyBhIHR lc3RtYWlsIOQg/CD2IOkg4CDoDQo=

    When I now decrypt that with base64 (I use a class in .NET), then I get:
    "This is a testmail d | v i ` h" (without the ")

    I can't find out, what happened with the special characters like ä/ü ... are
    they still encoded in mime? Has someone an algorithm for solving that
    problem.

    Thanks
    Patrick


  • Jon Skeet

    #2
    Re: base64 decode - problem with special characters

    Patrick <patrick911@blu email.ch> wrote:[color=blue]
    > I have a problem with Mime/base64 decoding. Maybe someone can help. I have
    > an original Text, that I send using outlook. The text is: "This is a
    > testmail ä ü ö é à è" (without the ")
    >
    > So on the mailserver I open the message and the body is base64 encoded and
    > contains
    > VGhpcyBpcyBhIHR lc3RtYWlsIOQg/CD2IOkg4CDoDQo=
    >
    > When I now decrypt that with base64 (I use a class in .NET), then I get:
    > "This is a testmail d | v i ` h" (without the ")
    >
    > I can't find out, what happened with the special characters like ä/ü ... are
    > they still encoded in mime? Has someone an algorithm for solving that
    > problem.[/color]

    I suspect the problem is probably that you're not specifying the
    character encoding - how did you convert the text to bytes before you
    Base64-encoded it?

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Patrick

      #3
      Re: base64 decode - problem with special characters

      > I suspect the problem is probably that you're not specifying the[color=blue]
      > character encoding - how did you convert the text to bytes before you
      > Base64-encoded it?[/color]

      the problem is, that the encoding is done by the email-client, in my case by
      outlook, so i don't know which is the exact encoding... any ideas?


      Comment

      • Jon Skeet

        #4
        Re: base64 decode - problem with special characters

        Patrick <patrick911@blu email.ch> wrote:[color=blue][color=green]
        > > I suspect the problem is probably that you're not specifying the
        > > character encoding - how did you convert the text to bytes before you
        > > Base64-encoded it?[/color]
        >
        > the problem is, that the encoding is done by the email-client, in my case by
        > outlook, so i don't know which is the exact encoding... any ideas?[/color]

        There should be a content-type header somewhere. What does the whole
        message look like?

        --
        Jon Skeet - <skeet@pobox.co m>
        Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

        If replying to the group, please do not mail me too

        Comment

        Working...