Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 596035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:07:41+00:00 2026-05-13T16:07:41+00:00

Is there an existing class in C# that can convert Quoted-Printable encoding to String

  • 0

Is there an existing class in C# that can convert Quoted-Printable encoding to String? Click on the above link to get more information on the encoding.

The following is quoted from the above link for your convenience.

Any 8-bit byte value may be encoded
with 3 characters, an “=” followed by
two hexadecimal digits (0–9 or A–F)
representing the byte’s numeric value.
For example, a US-ASCII form feed
character (decimal value 12) can be
represented by “=0C”, and a US-ASCII
equal sign (decimal value 61) is
represented by “=3D”. All characters
except printable ASCII characters or
end of line characters must be encoded
in this fashion.

All printable ASCII characters
(decimal values between 33 and 126)
may be represented by themselves,
except “=” (decimal 61).

ASCII tab and space characters,
decimal values 9 and 32, may be
represented by themselves, except if
these characters appear at the end of
a line. If one of these characters
appears at the end of a line it must
be encoded as “=09” (tab) or “=20”
(space).

If the data being encoded contains
meaningful line breaks, they must be
encoded as an ASCII CR LF sequence,
not as their original byte values.
Conversely if byte values 13 and 10
have meanings other than end of line
then they must be encoded as =0D and
=0A.

Lines of quoted-printable encoded data
must not be longer than 76 characters.
To satisfy this requirement without
altering the encoded text, soft line
breaks may be added as desired. A soft
line break consists of an “=” at the
end of an encoded line, and does not
cause a line break in the decoded
text.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:07:41+00:00Added an answer on May 13, 2026 at 4:07 pm

    There is functionality in the framework libraries to do this, but it doesn’t appear to be cleanly exposed. The implementation is in the internal class System.Net.Mime.QuotedPrintableStream. This class defines a method called DecodeBytes which does what you want. The method appears to be used by only one method which is used to decode MIME headers. This method is also internal, but is called fairly directly in a couple of places, e.g., the Attachment.Name setter. A demonstration:

    using System;
    using System.Net.Mail;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                Attachment attachment = Attachment.CreateAttachmentFromString("", "=?iso-8859-1?Q?=A1Hola,_se=F1or!?=");
                Console.WriteLine(attachment.Name);
            }
        }
    }
    

    Produces the output:

    ¡Hola,_señor!

    You may have to do some testing to ensure carriage returns, etc are treated correctly although in a quick test I did they seem to be. However, it may not be wise to rely on this functionality unless your use-case is close enough to decoding of a MIME header string that you don’t think it will be broken by any changes made to the library. You might be better off writing your own quoted-printable decoder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 376k
  • Answers 376k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer When you call begin() the compiler by default creates a… May 14, 2026 at 8:35 pm
  • Editorial Team
    Editorial Team added an answer Release it in both. You don't need to check for… May 14, 2026 at 8:35 pm
  • Editorial Team
    Editorial Team added an answer You need to use the -cp argument. scomp -cp s1.jar… May 14, 2026 at 8:35 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.