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 8873845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:34:06+00:00 2026-06-14T18:34:06+00:00

I am trying to parse an Gmail’s email. I am using Imap methods and

  • 0

I am trying to parse an Gmail’s email. I am using Imap methods and so far so good.
My problem is with html emails. I searched everywhere for converting html body to plain text but nothing works for me so I am trying to do it myself. I am taking the html, clearing the all the attributes and now I have an encoding issue.
Some of my emails are in Hebrew and the Hebrew in the html looks like this :

=F0=E0 =F6=F8=E5 =E0=E9=FA=E9 =F7=F9=F8 =E1=E1=F7=F9=E4 =E1=E8=EC=F4=
=E5=EF

I tried converting it from hex to string but the result wasn’t perfect. some words were missing.

How can I convert is to Hebrew chars?

Thanks a lot,
Elad

  • 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-06-14T18:34:07+00:00Added an answer on June 14, 2026 at 6:34 pm

    It seems you have some encoding issues with the HTML you receive.
    You’re going to need to convert it to the correct encoding.

    This works:

            Encoding latinEncoding = Encoding.GetEncoding("Windows-1252");
            Encoding hebrewEncoding = Encoding.GetEncoding("Windows-1255");
    
            string msys = "=F0=E0 =F6=F8=E5 =E0=E9=FA=E9 =F7=F9=F8 =E1=E1=F7=F9=E4 =E1=E8=EC=F4=E5=EF";
            msys = System.Web.HttpUtility.UrlDecode(msys.Replace('=', '%').Replace(" ", "%20"), latinEncoding);
    
            byte[] latinBytes = latinEncoding.GetBytes(msys);
            string hebrewString = hebrewEncoding.GetString(latinBytes);
    

    First part of your problem is that the =F0=E0.. are actually URLEncoded with a = instead of a % at the begining. So we replace the problematic characters and UrlDecode it.

    Afterwards, we convert it from the Windows-1252 encoding to the Windows-1255 encoding.

    As a side note: there is a problem in the example string you gave: =F4= =E5=EF should actually be =F4 =E5=EF (the = character is always before, not after the decoded part)

    I tested it and it works fine on your string… בהצלחה

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

Sidebar

Related Questions

Using Python and imaplib I am connecting to 2 imap servers (gmail) and trying
Trying to parse an HTML document and extract some elements (any links to text
Im trying to parse the string located in /proc/stat in a linux filesystem using
Trying to parse a YouTube feed using PHP simplexml_load_file(); I am able to access
i am trying to read a html file and convert it to pdf using
I am trying parse out some text that is in an html file. The
Trying to parse and XLSX file using roo gem in a ruby script. In
I am trying to send Email using java mail API from with in a
I am trying parse the ESPN bottom line feed using RegEx but am coming
trying to parse this as datetime : 2011.03.13-21:15:04+511.0597 using Console.WriteLine(DateTime.ParseExact(2011.03.13-21:15:04+511.0597, yyyy.MM.dd-hh:mm:ss+ttt.tttt, CultureInfo.CreateSpecificCulture(en-US)).ToString()); but it

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.