Jump to content

Trying to encode É with maddening results


Guest xoc

Recommended Posts

Hello all,I am trying to encode É (Capital E with an accent) into an CDATA description for a Flash site I am constructing, and I keep running into a wall trying to get it to appear.I've scoured the net for a solution, and I've found a lot of articles describing technically how it works in hex code but no article actually describing what I am supposed to write into my XML document. I know the hex code for this character but not sure how to break down my XML file into hex so I can add it in (for if that works - I am a noob).I am using UTF-8 encoding:<?xml version="1.0" encoding="UTF-8"?>This is the code. L'ORÉAL needs the É character (noted in bold):<work> <title><![CDATA[<font color="#999900">ESSIE</font><br>L'OREAL USA]]></title> <description> <![CDATA[MEET ESSIE. AN ICONIC BRAND AND AN ICONIC PERSONALITY. THIS POSITIONING VIDEO INTRODUCES ESSIE, AS HER EPONYMOUS BRAND IS ACQUIRED BY L'OREAL USA.]]> </description> <code>ess</code><padd></padd> <add1>ess1</add1> <add2></add2> <add3></add3> <weblink></weblink> <video>video/ess.flv</video> <category></category></work>I have tried all of these to encode the É into my document:& # 2 0 1 ; (shows nothing, obviously no spaces, I did that to keep it from converting)É (appears literally as that text)É (appears literally as that text)And just to be stupid:É (shows nothing)Someone also wrote that you can do the letter to be accented (E) in this case, followed by ´, which I tried - no dice (appears literally as that text)Sorry if this is an amateurish question - thanks for your help!

Link to comment
Share on other sites

Make sure that your text editor is saving the file in UTF-8 encoding. If it does, you just need to type É and that's how it will appear in the file. Notepad, for example, saves as ANSI by default, you have to change that in the dialog that appears when selecting "Save as..."Entities (&XXX;) won't be parsed if you're using them in a CDATA section. (Unless that code is extracted from the XML document and parsed in an HTML document)If you are loading this into an HTML document, be sure that the HTML document is using UTF-8 encoding as well.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...