xml and utf-8 attribute

praxMatrix Internet Services office at praxmatrix.com
Sat Jan 14 16:33:33 EST 2006


I'm having a lot of trouble getting the right characters to appear for an
XML attribute. The file loads correctly and displays the English words with
no problems but the translation attribute returns garbled characters. The
XML is encoded as UTF-8. I've tried implementing the various suggestions
I've found in the archives re uniDecode / htmlText etc but am having no
luck. The languages I am trying to use are Spanish, French and Polish. Any
pointers or links to tutorials would be very helpful. This is the typical
format of the XML file:


<?xml version="1.0" encoding="UTF-8"?>
<player>
<snd path="mp3/4.mp3" title="Spain"  desc="Member Countries of the European
Union" trans="España" pic="img/es.jpg"/>
</player>

This is the tanscript code that pushes the 'trans' attribute into the field:
put revXMLAttribute(tDocID2,"/player/snd["&sndID&"]","trans") into field
"trans"

And this is the typical output for non English characters:

España

Thanks.

Anthony Hughes
praxMatrix Ltd.








More information about the use-livecode mailing list