User Guide

Performance and Flash Player 119
Using System.useCodepage in your code forces the SWF file to use the systems code page
instead of Unicode.
Only use this process in the following situations: when you are loading non-Unicode encoded text
from an external location and when this text is encoded with the same code page as the users
computer. If both these conditions are true, the text appears without a problem. If both of these
conditions are not true, use Unicode and a Unicode escape sequence to format your text. To use
an escape sequence, add the following ActionScript on Frame 1 of the Timeline:
this.createTextField("myText_txt", 99, 10, 10, 200, 25);
myText_txt.text = "this is my text, \u00A9 2004";
This ActionScript creates a text field, and enters text that includes a copyright symbol (©).
You can make a SWF file use the operating systems code page, which is controlled by the
useCodepage property. When Flash exports a SWF file, it defaults to exporting Unicode text and
System.useCodepage is set to false. You might encounter problems displaying special text, or
text on international systems where using the systems code page can seem to solve the problem of
text incorrectly displaying. However, using
System.useCodePage is always a last resort. Place the
following line of code on Frame 1 of the Timeline:
System.useCodepage = true;
Caution: The special character displays only if the user’s computer has the character included in the
font that is being used. If you are not sure, embed the character or font in the SWF file.
The following table contains a number of commonly used Unicode escape sequences.
Character description Unicode escape sequence
em-dash ()\u2014
registered sign (®) \u00AE
copyright sign (©) \u00A9
trademark sign ()\u2122
Euro sign ()\u20AC
backslash (\) \u005C
forward slash (/) \u002F
open curly brace ({) \u007B
close curly brace (}) \u007D
greater than (<) \u003C
less than (>) \u003E
asterisk (*) \u002A