Home
TeamSite
special characters and iso-8859-1 with <inline>
tobias
TST 5.5.2 on WinNT:
As is stated in "Appendix E" of TST's Developer's Guide I can set the correct encoding in the <?xlm> tag of my datacapture.cfg files. This works well unless the datacapture.cfg contains an <inline> tag calling a perl script which returns well-formed XML (containing special characters) to be included in my datacapture form, even though the datacapture.cfg itself also contains special characters.
If the returned XML contains special characters (namely Portugese characters), e.g. item names, I get the error message
A MessageException was thrown: Error building the requirements: null
when I try to open the datacapture form.
I couldn't get it to work with various variations of XML encoding in both the datacapture.cfg and the XML returned by the inline callout (remember: the XML returned by the inline callout also contains a line like
<?xml version="1.0" encoding="UTF-8"?>
).
Could anyone help me with this?
Find more posts tagged with
Comments
MattP
Not sure if this is the best solution, but have you tried returning your content in CDATA tags?
So your retuen would say...
<substitution>
<default>
<![CDATA[ all of your content here ]]>
</default>
</substitution>
I haven't tried this, but seems like it is worth a shot.
Let me know how yu make out.
Good Luck
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
tobias
Thanks for the suggestion.
Unfortunately it doesn't work. XML enclosed by the CDATA tags is merely ignored and is not displayed in the datacapture form.
Just for better understanding, here's the <inline> tag of my datacapture.cfg:
<inline command="c:/iw-home/teamsite/iw-perl/bin/iwperl.exe c:/iw-home/teamsite/iw-perl/bin/local/common_include_opo.ipl"/>
I'll also attach the file
common_include_opo.ipl
so please feel free to have a look at it and give me any comments. (The attached version doesn't contain any special characters, but as soon as I write
último
instead of
ultimo
the datacapture form can't be displayed).
Tobias
JamJamT
I ran into similar issues with special French characters. I found the conversion subroutine in the below technote to be useful.
TechNote: 48832 Title: Handling Euro Characters
tobias
Great - that was it!
Many thanks for your help, with the code provided in the TechNote it works fine.