infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
XML with UTF-16 encoding
Rick Martin
Is there a secret to getting an XML file with UTF-16 encoding to work in Cloverleaf? I've tried a bunch of combinations of files with and without BOM (Byte Order Mark) characters and encoding attributes.
I keep getting the "Fatal Error generated during parsing. - Invalid document structure" error.
I'm assuming it is an encoding problem, since I can get a UTF-8 file to work just fine.
Thanks, Rick
Find more posts tagged with
Clovertech
Comments
RobertKersemakers
Hi Rick,
Not sure if this helps, but we had an XML problem with UTF-8: a special character came in as a 2-byte character and this way a field would exceed it's maximum length. Of course a mistake on the sending side, but no way to correct this on time at the sending side.
So we converted the incoming XML from UTF-8 into ISO8859-1:
set msg [encoding convertfrom utf-8 [msgget $mh]]
This way the 2-byte special character became a single byte character again (
System
Originally posted by Anonymous
First and foremost: Cloverleaf only deals properly with encodings if you use the multi byte version (5.5MB or 5.6MB)
If you don't Cloverleaf will handle anything as if it was iso8859-1 regardless of what it actually is. I.e.: Cloverleaf is not encoding aware.
You may want to have a look inside $HCIROOT/tcl/lib/tcl8.../encodings. Suppose you have utf-16 there, you should be able to have the command Robert already gave you to convert to iso8859-1.
ISO8859-1 is your only safe encoding in Cloverleaf unless you use the multi byte version.