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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:22:58+00:00 2026-05-11T00:22:58+00:00

There are a variety of characters that are not legally encodeable in XML 1.0,

  • 0

There are a variety of characters that are not legally encodeable in XML 1.0, e.g. U+0007 (‘bell’) and U+001B (‘escape’). Most of the interesting ones are non-whitespace ‘control’ characters.

It’s clear from (e.g.) this question and others that it’s the XML spec that’s the issue — but can anyone illuminate me as to why the XML spec forbids these characters?

It seems like it could have been required that they be encoded in escapes, e.g. as  and  respectively, but perhaps there’s a practical reason that the characters were forbidden rather than required to be escaped?

Answerers have suggested that there is some motivation towards avoiding transmission control characters, but Unicode includes many other control-like characters (consider U+200C ‘zero width non joiner’). I recognize there may be no good reason for this behavior, but I would still like to understand it better.

It’s particularly frustrating because when those character values appear in other encodings data formats, I end up ‘double-escaping’ new XML documents that need to encode this.

  • 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. 2026-05-11T00:22:59+00:00Added an answer on May 11, 2026 at 12:22 am

    My understanding is that this range is barred on the grounds that a markup language should not have any need to support transmission and flow control characters and including them would create a problem for any editors and parsers in binary conversion.

    I’m struggling to find anything ex cathedra on this from Tim Bray et al though.

    edit: some discussion of control chars and a vague admission it wasn’t exactly over-engineered:

    At 09:27 AM 17/06/00 -0500, Mark Volkmann wrote:

    I’ve never seen a discussion of the reason why most ASCII control characters, such as a form feed, are not allowed in XML documents. Can anyone tell me the reason behind that decision or point me to a spec. that explains that?

    I’m not sure we’d do it the same way if we were doing it again. I don’t see that they do any real harm. Clearly, if you’re optimizing for a highly interoperable content markup language (and XML is) it’s legitimate to be suspicious of things like vertical-tab and backspace and so on… but then how can it be consistent to leave in \n and DEL and so on? -Tim

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

Sidebar

Related Questions

I'm building the interface within interface builder and see that there's a variety of
There are a variety of Internal` context functions that are useful, such as InheritedBlock
There are a variety of variables stored in the android.os.Build class that you can
There seem to be a variety of PHP frameworks that claim RESTful design patterns.
I've seen that to create division operations there is variety of possibilities, UDiv/SDiv and
I know that there are a variety of similarly posed questions here on SO
It looks like there are a variety of virtual machine offerings available. What is
There is a moment in my app, that I need to force to show
There is a column that exists in 2 tables. In table 1, this column
There is a variety of Game Engines out on the market, free as commercial.

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.