A character Windows-1252 has above 0x7F (é, ©, –, ’, a no-break space) fails the whole document with 0x80040400 when written as itself, and is stored exactly when written as a reference (é); a character Windows-1252 doesn't have is stored as its nearest match, or ?

Observed 2026-10-18 on QuickBooks Enterprise Solutions 24.0, reporting qbXML 17.0.

A character that Windows-1252 has above 0x7F, such as é, ©, –, ’ or a no-break space, fails the whole document when written as itself in a request declared encoding="utf-8". The Web Connector reports hresult 0x80040400 with this message:

Text
QuickBooks found an error when parsing the provided XML text stream.

The same character written as a numeric character reference, such as &#xE9;, is stored exactly. A character Windows-1252 does not have is stored as its nearest match or as ?, with no warning: ą ł ő became a l o, Ж became ?, 中文 became ??, and an emoji became ??. Plain ASCII, escaped & < > " ', a tab and a newline are stored as sent. A document declared encoding="windows-1252" with é – € written as themselves was stored exactly, and the same document with no encoding declared failed.

This name, written with references, was stored exactly:

qbXML
<CustomerAdd>
  <Name>PMchar 0007-V1 Caf&#xE9; &#x2013; Ann&#x2019;s &#xBD; &#xA9; a&#xA0;b</Name>
</CustomerAdd>

QuickBooks' answer wrote every character above ASCII as a decimal reference to its Windows-1252 byte:

qbXML
<Name>PMchar 0007-V1 Caf&#233; &#150; Ann&#146;s &#189; &#169; a&#160;b</Name>

To an XML parser, &#150; is the control character U+0096, not –. A CDATA section closed around a reference, as in <FullName><![CDATA[PMchar Caf]]>&#xE9;<![CDATA[ & Co]]></FullName>, was read as one name. The pattern fits the Web Connector passing the request on as Windows-1252 while QuickBooks parses it as the UTF-8 the declaration names.

What to do

Write every character above ASCII in text and attribute values as a numeric character reference, including inside a CDATA section, which you close around each reference. When you read answers, treat &#128; to &#159; as the Windows-1252 characters at those bytes, as HTML does. Expect characters outside Windows-1252 to come back changed, and compare names loosely when you match what you sent with what QuickBooks stored.

Not observed

  • Whether the conversion follows the Windows code page of the computer running the Web Connector. This one used Windows-1252; references do not depend on it.
  • Other editions, versions and countries.
  • Whether encoding="ISO-8859-1" behaves like windows-1252.
  • Whether an emoji counts as one character or two toward a field's length.

Error codes on this page

QuBe Sync is a JSON API for QuickBooks Desktop that is built on what these findings show.