I'm trying to set the value of some items using javascript when the template first loads like so:IWDatacapture.getItem("/Path/To/Item[1]/Caption").setValue("£150");IWDatacapture.getItem("/Path/To/Item[2]/Caption").setValue("£250");Once loaded, the item boxes appear to display a square box before the number. I suspect that this is something to do with the encoding type of the datacapture and presentation templates.Currently, the xml declaration at the head of the datacapture template is<?xml version="1.0" standalone="no"?>The presentation template does not appear to have an xml declaration, but it does have an iw_pt tag with the encoding attribute set to ISO-8859-1.Do I just need to make sure that the encoding for both of these templates is the same?
I'm using TS 6.5 on W2K.I've been editing my files using gvim.I've tried changing the xml prolog for the datacapture template to<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>and I still get the square character instead of the British pound sign (£) before the numbers.
After a bit of digging around, I found this:http://devnet.interwoven.com/forums_vb/showthread.php?t=798&forumid=13&highlight=pound+signSo, what I've done is copied the two bytes that are used to represent the pound sign and pasted them into the javascript - and it works (phew).Yes, I think my gvim session was using a different encoding to UTF-8 whilst editing the datacapture template, hence when I entered a pound sign in my current encoding (LATIN-1 I think), it was being incorrectly interpreted in the DCR (hence the square) which assumes UTF-8.I suppose, I should be editing the datacapture template using an UTF-8 compatible editor.Thanks for everybody's help.
In UTF-8 Pound Sign is represented by two bytes £ ( Hexadecimal String 0xC2A3 ). It sounds like that's what you used.Although that works, with non-unicode software it is better to use special entities. Any of the following will work:£ £ £( 163 = 0xA3 is so called "code point" of the Pound Sign )
Are you aware of any document / weblink which talks about these special characters / unicode thing?