DeryckOE
DeryckOE

Reputation: 105

Loading special characters in a string loaded via XML in AS3

When I load an XML using ActionScript all the characters inside strings render fine except special characters like:

ñ, Ñ, á, é, í, ó, ú

In that cases the letter is omitted.

I even try with:


ñ or í

But in that case show exactly ñ and í instead of ñ or í.

¿What can I do?

Thanks.

Upvotes: 0

Views: 2491

Answers (2)

Gabi
Gabi

Reputation: 11

Save the xml file in UNICODE format. No need for CDATA.

Upvotes: 1

typeoneerror
typeoneerror

Reputation: 56948

Make sure your file is UTF encoded and then embed those additional characters in your TextField. Also, make sure the font you are using supports those characters. While you're at it, wrap your text values in <![CDATA[]]> (character data) in the XML file, e.g.

<textNode><![CDATA[ñ, Ñ, á, é, í, ó, ú]]></textNode>

Upvotes: 3

Related Questions