Flash / Flex / ActionScript/String/fromCharCode
Converting Between Strings and Unicode or ASCII
<source lang="java">
package{
import flash.display.Sprite; public class Main extends Sprite{ public function Main(){
trace( "New paragraph: " + String.fromCharCode( 182 ) ); trace( "Cents: " + String.fromCharCode( 162 ) ); trace( "Name: " + String.fromCharCode( 68, 97, 114, 114, 111, 110 ) ); } }
}
</source>
Use String.frolmCharCode to create a string
<source lang="java">
package{
import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var example:String = String.fromCharCode( 191 ) + String.fromCharCode( 243 ) + String.fromCharCode( 225 ) + String.fromCharCode( 241 ); if ( example.charCodeAt( 0 ) == 191 ) { trace( "The string \"" + example + "\" has a \u00BF at the beginning." ); } } }
}
</source>