Writing double-byte applications

If you are using server-side ActionScript in a development environment that facilitates double-byte text (such as an Asian language character set), your server-side ActionScript must be in an ASC file that is UTF-8-encoded. This means you'll need a JavaScript editor, such as the Script window in Flash Professional or Dreamweaver, that encodes files to the UTF-8 standard. Then, you can use built-in JavaScript methods such as Date.toLocaleString, which converts the string to the locale encoding for that system.

TIP

 

Some simple text editors might not encode files to the UTF-8 standard; Microsoft Windows Notepad for Windows XP and Windows 2000 provides a Save As option to encode files to the UTF-8 standard.

To ensure UTF-8 encoding in Dreamweaver, you need to check two settings: the document encoding setting and the inline input setting.

To use double-byte characters as method names, the method names must be assigned by using the object array operator and not the dot operator:

// This is the CORRECT way to create double-byte method names.
obj["Any_hi_byte_name"] = function(){} 

// This is the INCORRECT way to create double-byte method names.
obj.Any_hi_byte_name = function() {} 

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000114.html