Accented characters arrive garbled in the SAP cart
The basket transfers and descriptions in SAP show ü instead of ü, a # instead of a symbol, or a question mark where a dash was. Plain ASCII products are fine.
An OCI return is an HTML form post, so there is no XML declaration to state the encoding. The browser encodes the fields using your page’s character set, or the form’s accept-charset, and SAP decodes them using the code page configured for the catalogue call. When those disagree, every character outside plain ASCII is damaged. Ask the buyer which encoding their system expects and make your transfer page and form declare exactly that.
Causes, most likely first
Ordered by how often each one turns out to be the culprit, not by how interesting it is. Work down the list.
-
Your page charset and the buyer’s expected encoding differ
How to confirm: You serve the transfer page as UTF-8 and the buyer’s system decodes as ISO-8859-1, or the reverse. Two-character junk sequences such as é are the signature of UTF-8 bytes read as Latin-1.
Fix: Set the charset on the transfer page and accept-charset on the form to the encoding the buyer names. Serve that page separately from the rest of your catalogue if the two need different settings.
-
The character does not exist in the target code page
How to confirm: Characters such as the euro sign, curly quotes or an em dash become # or ? while ordinary accented letters survive. ISO-8859-1 has no euro sign at all, and SAP knowledge base articles describe special characters shown as # after transfer.
Fix: Replace characters outside the buyer’s code page with plain equivalents before building the form: straight quotes, a hyphen, EUR. Do it only on the transfer page so your site keeps the proper characters.
-
HTML entities are escaped twice
How to confirm: The SAP description shows & or " literally. Your template escaped a value that your data layer had already escaped.
Fix: Escape field values once, at the point you write them into the form’s value attributes, and store plain text everywhere else.
-
The buyer runs a non-Unicode system
How to confirm: Characters from one script work and another fail, for instance Cyrillic or Asian text on a Western European installation. The buyer’s system cannot store them regardless of how you send them.
Fix: Agree a transliteration rule for that buyer, or send those descriptions in a language their system can hold.
If it is not on your side
Ask the buyer which character encoding the OCI call for your catalogue is configured with on their side, and send them one test product whose description contains an umlaut, a euro sign and an em dash. How each survives tells both sides where the conversion fails.
Check the document itself
Before chasing “Accented characters arrive garbled in the SAP cart” further, paste the cXML or OCI payload into our free tester. It runs in your browser and reports the structural problems buyers reject on. The interactive demo plays the whole round trip from the buyer's seat.
Open the tester Play the demoRelated questions
Should we just send UTF-8?
Only if the buyer confirms their system expects it. With cXML, UTF-8 is the safe default because the document declares its own encoding. OCI has no such declaration, so the buyer’s setting decides.
Does this affect the HOOK_URL and other inbound parameters too?
It can. Inbound parameters with accented values, such as a user name, are encoded by the buyer’s system. Decode them using the same encoding you agreed for the return, not your server default.
Rather not be the one debugging this?
A free PunchOut shop runs the PunchOut round trip for you: upload from Excel, test it, invite your buyer.
Start free Send us the error