<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Using special characters in your Flex applications</title>
	<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Tue, 06 Jan 2009 05:36:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-16748</link>
		<author>peterd</author>
		<pubDate>Mon, 17 Nov 2008 15:59:22 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-16748</guid>
		<description>Jack,

On Windows you can use charmap.exe to find all sorts of special characters and their unicode values (which may or may not be different/available, depending on which font you're using).

The character you want is "Not Equal To", and is U+2260: &#2260;

Peter</description>
		<content:encoded><![CDATA[<p>Jack,</p>
<p>On Windows you can use charmap.exe to find all sorts of special characters and their unicode values (which may or may not be different/available, depending on which font you&#8217;re using).</p>
<p>The character you want is &#8220;Not Equal To&#8221;, and is U+2260: &#2260;</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-16746</link>
		<author>Jack</author>
		<pubDate>Mon, 17 Nov 2008 12:28:44 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-16746</guid>
		<description>Hi. 
Just looking for a special character for a "does not equal" eg. an equals sign with a slash going through it...do you have any idea if one exists? Thanks</description>
		<content:encoded><![CDATA[<p>Hi.<br />
Just looking for a special character for a &#8220;does not equal&#8221; eg. an equals sign with a slash going through it&#8230;do you have any idea if one exists? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quentin</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-5210</link>
		<author>Quentin</author>
		<pubDate>Tue, 18 Dec 2007 13:56:29 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-5210</guid>
		<description>Well, no...
At least not for my snippet.</description>
		<content:encoded><![CDATA[<p>Well, no&#8230;<br />
At least not for my snippet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jbishop</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-5054</link>
		<author>jbishop</author>
		<pubDate>Thu, 13 Dec 2007 20:02:34 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-5054</guid>
		<description>nice! It is also critical that you have the special characters embedded in the font you're using.</description>
		<content:encoded><![CDATA[<p>nice! It is also critical that you have the special characters embedded in the font you&#8217;re using.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quentin</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-4744</link>
		<author>Quentin</author>
		<pubDate>Tue, 04 Dec 2007 13:48:41 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-4744</guid>
		<description>To properly display the euro character from strings got via a RemoteObject (using AMFPHP) I simply used this line of code :
&lt;pre class="code"&gt;
myString=myString.replace(String.fromCharCode(128), "€");
&lt;/pre&gt;

And oddly enough, this works...
Instead of a weird square character, I get the nice '€' one!</description>
		<content:encoded><![CDATA[<p>To properly display the euro character from strings got via a RemoteObject (using AMFPHP) I simply used this line of code :</p>
<pre class="code">
myString=myString.replace(String.fromCharCode(128), "€");
</pre>
<p>And oddly enough, this works&#8230;<br />
Instead of a weird square character, I get the nice &#8216;€&#8217; one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-59</link>
		<author>Theo</author>
		<pubDate>Sun, 05 Aug 2007 13:51:18 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-59</guid>
		<description>Yes, it works in a MXML document, because the XML parser translates &#38;#8364; into €, but it doesn't work if you put the &#38;#8364; in ActionScript code, or if you load it using remote objects. Like this (in an .as or a script tag):

&lt;pre class="code"&gt;
textField.text = "&#38;#8364;";
&lt;/pre&gt;

That will display the literal string in the text field, however

    

works fine.



I hadn't considered htmlText though, good idea. It should work regardless.</description>
		<content:encoded><![CDATA[<p>Yes, it works in a MXML document, because the XML parser translates &amp;#8364; into €, but it doesn&#8217;t work if you put the &amp;#8364; in ActionScript code, or if you load it using remote objects. Like this (in an .as or a script tag):</p>
<pre class="code">
textField.text = "&amp;#8364;";
</pre>
<p>That will display the literal string in the text field, however</p>
<p>works fine.</p>
<p>I hadn&#8217;t considered htmlText though, good idea. It should work regardless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-47</link>
		<author>peterd</author>
		<pubDate>Sat, 04 Aug 2007 04:39:12 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-47</guid>
		<description>Theo,

How is it not working?

If I try this in my MXML document it seems to work:

&lt;pre class="code"&gt;
&#60;mx:CurrencyFormatter id="cf" currencySymbol="&#38;#8364;" precision="2" /&#62;
&#60;mx:Text htmlText="{cf.format(100)}" /&#62;
&lt;/pre&gt;

Also, if I load a remote document (content.txt) it looks like it parses that &#8364; character properly (as long as I set the &lt;code&gt;htmlText&lt;/code&gt; property and not the &lt;code&gt;text&lt;/code&gt; property). Observe:

&lt;pre class="code"&gt;
&#60;mx:HTTPService id="getText" url="content.txt" resultFormat="text" /&#62;
&#60;mx:Text condenseWhite="true" creationComplete="getText.send()"&#62;
    &#60;mx:htmlText&#62;{getText.lastResult}&#60;/mx:htmlText&#62;
&#60;/mx:Text&#62;
&lt;/pre&gt;

And my content.txt file looks like:
&lt;pre class="code"&gt;
&#60;p&#62;I'm a big fancy eurosymbol: &#38;#8364;&#60;/p&#62;
&lt;/pre&gt;

Is that roughly what you were looking for, or did I totally misunderstand?

Peter (who hopes the formatting for this turned out)</description>
		<content:encoded><![CDATA[<p>Theo,</p>
<p>How is it not working?</p>
<p>If I try this in my MXML document it seems to work:</p>
<pre class="code">
&lt;mx:CurrencyFormatter id="cf" currencySymbol="&amp;#8364;" precision="2" /&gt;
&lt;mx:Text htmlText="{cf.format(100)}" /&gt;
</pre>
<p>Also, if I load a remote document (content.txt) it looks like it parses that &#8364; character properly (as long as I set the <code>htmlText</code> property and not the <code>text</code> property). Observe:</p>
<pre class="code">
&lt;mx:HTTPService id="getText" url="content.txt" resultFormat="text" /&gt;
&lt;mx:Text condenseWhite="true" creationComplete="getText.send()"&gt;
    &lt;mx:htmlText&gt;{getText.lastResult}&lt;/mx:htmlText&gt;
&lt;/mx:Text&gt;
</pre>
<p>And my content.txt file looks like:</p>
<pre class="code">
&lt;p&gt;I'm a big fancy eurosymbol: &amp;#8364;&lt;/p&gt;
</pre>
<p>Is that roughly what you were looking for, or did I totally misunderstand?</p>
<p>Peter (who hopes the formatting for this turned out)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-46</link>
		<author>Theo</author>
		<pubDate>Fri, 03 Aug 2007 13:04:43 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-46</guid>
		<description>The translation between &#38;#xxxx; and characters seems to be done at compile time, most likely by the XML parser. This is a bummer if you load data from a database and want to display some special characters.

I've been desperately trying to create a currency formatter which gets it's currency symbol via a remote object call to display a € (Euro symbol, char code 8364). Can't get it to work... all I get is a â (a with circumflex).

Your method works fine if I do this:

	

But not if I do this:
&lt;pre class="code"&gt;
var cf : CurrencyFormatter = new CurrencyFormatter();
cf.currencySymbol = "&#8364;"
&lt;/pre&gt;
	
(and because of that, loading a string containing "&#38;#8364" obviously wouldn't work either)
	
You would have to do this (which doesn't work so well when you load your data externally, it's not feasible to scan through all text looking for entities):

&lt;pre class="code"&gt;
var cf : CurrencyFormatter = new CurrencyFormatter();
cf.currencySymbol = String.fromCharCode(8364);
&lt;/pre&gt;

As it is I have given up, other currencies are written with their three-letter abbreviations anyway, so writing EUR 33.00 is perfectly fine. However, it would look so much better with a proper €. If you have any similiar ideas of how to get special characters to work in an even more general way I would be very interested.</description>
		<content:encoded><![CDATA[<p>The translation between &amp;#xxxx; and characters seems to be done at compile time, most likely by the XML parser. This is a bummer if you load data from a database and want to display some special characters.</p>
<p>I&#8217;ve been desperately trying to create a currency formatter which gets it&#8217;s currency symbol via a remote object call to display a € (Euro symbol, char code 8364). Can&#8217;t get it to work&#8230; all I get is a â (a with circumflex).</p>
<p>Your method works fine if I do this:</p>
<p>But not if I do this:</p>
<pre class="code">
var cf : CurrencyFormatter = new CurrencyFormatter();
cf.currencySymbol = "&#8364;"
</pre>
<p>(and because of that, loading a string containing &#8220;&amp;#8364&#8243; obviously wouldn&#8217;t work either)</p>
<p>You would have to do this (which doesn&#8217;t work so well when you load your data externally, it&#8217;s not feasible to scan through all text looking for entities):</p>
<pre class="code">
var cf : CurrencyFormatter = new CurrencyFormatter();
cf.currencySymbol = String.fromCharCode(8364);
</pre>
<p>As it is I have given up, other currencies are written with their three-letter abbreviations anyway, so writing EUR 33.00 is perfectly fine. However, it would look so much better with a proper €. If you have any similiar ideas of how to get special characters to work in an even more general way I would be very interested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oğuz Demirkapı</title>
		<link>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-38</link>
		<author>Oğuz Demirkapı</author>
		<pubDate>Fri, 03 Aug 2007 05:16:00 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications/#comment-38</guid>
		<description>Nice to see this sample. Thanks! 

But as I know we can directly use Unicode chars without any need of any kind of replacement if you have the right font.</description>
		<content:encoded><![CDATA[<p>Nice to see this sample. Thanks! </p>
<p>But as I know we can directly use Unicode chars without any need of any kind of replacement if you have the right font.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
