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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:03:35+00:00 2026-05-16T03:03:35+00:00

We have a process in which XML is transferred to us via ESMTP in

  • 0

We have a process in which XML is transferred to us via ESMTP in an email body. The character set of the email body is specified as ISO-8859-1, and no encoding is specified for the XML. According to the protocol, the default is UTF-8.

The problem is our XML parser is throwing an exception when it encounters the ® character because it thinks it’s parsing UTF-8, and the ® character in UTF-8 is 2 bytes, not 1 as in ISO-8859-1.

  1. Should we assume that the body is ISO-8859-1 and thus override the XML encoding (UTF-8)?
  2. More subjectively, is the email being sent incorrectly, and would it be better for us to try to interpret as UTF-8 on our side or ask whoever is sending it to correctly and consistently specify the encoding?

Here is a sample email body with XML:

Delivered-To: ...
Received: ...
Received: ...
Return-Path: ...
Received: ...
Received-SPF: ...
Authentication-Results: ...
Received: ...
Thread-Topic: ...
From: ...
To: ...
Subject: ...
Date: ...
Message-ID: ...
MIME-Version: 1.0
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325

<?xml version="1.0"?>
...
   <comments>Super Widget®</comments>
...
  • 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-16T03:03:35+00:00Added an answer on May 16, 2026 at 3:03 am

    The XML specification says in appendix F, concerning encoding detection:

    Also, in many cases other sources of information are available in addition to the XML data stream ifself.

    So yes, in lack of an encoding="..." in the XML stream itself, you should rely on the external source, which in this case is the Content-Type header.

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

Sidebar

Related Questions

I have process which continuously downloads XML from the feed and saves it to
I have ASP.NET MVC application with action which should process posted XML data. At
I have the following file which process a single XML file and pushes it
I have a swf file, which handels some xml data. After that process complets
I have a process which has a notify method which receives as a parameter
I have a process which gives me continuously output in Screen. I want to
I have a process which iterates through a bunch of ActiveRecord models, does some
I have a process x which uses system C function to start ntpd daemon.
We have a feed process which runs every day of the year. As part
I have a C++ process which has a thread that needs to send floats

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.