Tips of using Unicode (Chinese) in Flash and ASP

2009-07-27

In a recent project, we translate a Flash website from English to Chinese. All goes well at the very beginning. But we notice that we are in troubles when we encounter the following issues:

  1. The input text fields did not accept Chinese input
  2. When we compile the project in a Chinese OS environment. Now the Chinese input is accepted but the SWF output file is in a big size
  3. The automated notification email fails to show Chinese
  4. The text logging file fails to show Chinese

It takes me nearly a whole week to solve all those issues. I would like to share the tips with those in the same boat.

  • To accept Chinese input, we choose the most standard “SongTi” font family in the input text field
  • To reduce the file size, we don’t embed any characters. See attached screenshot. 

 

  • To make the automated notification email work with Unicode in ASP
    • We save the ASP file in UTF-8 encoding.
    • we set the locale ID to Unicode in the email script (CDONTS),
      Set objCDO = Server.CreateObject("CDONTS.NewMail")
      .........
      objCDO.SetLocaleIDs(65001)
  • To make the text logging work with Unicode in ASP
    • We save the existing logging text file in UTF-8 encoding
    • We change the text logging script to
      SET objFS = SERVER.CreateObject("Scripting.FileSystemObject")SET objF = objFS.OpenTextFile(myFullPath,8,TRUE, -1)
      .........

That's all. It just takes only minutes to implement (but takes me a week to test and find it out). :-(







Categories

Search eGaWa.Blog

Keyword 1
Keyword 2
Keyword 3
Category
Search

Search Web

Reload Page