[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] swfc and DBCS languages/utf-8 text input (Chinese/Japa

From: Bill Hall
Subject: [Swftools-common] swfc and DBCS languages/utf-8 text input (Chinese/Japanese/...) - a little updated.
Date: Sat, 5 Aug 2006 23:08:48 -0400

OK... I've been searching and trying things.

Now I know that the 3 hex chars at the begining of the file is the BOM Byte Order Mask to denote the file  encoding (if not standard ansi)
   Mine is:  EFBBBF which denotes UTF-8

I thought I read someplace that swfc supports UTF-8  files?  If so, what dd Ido wrong in the last test.  (i.e. Notepad to generate a text .sc file, 
       paste in the Chinese characters and save as UTF-8) 

If not,  if you have an example of how to get encoded strings into a variable ...it'd help a lot.

I tried modifying the fontoutline.sc  example for a test.
I tried a regular ascii/ansi file with escaped string (....I probably have a lot of errors...maybe byte order,  The Chinese characters are encoded as 3 hex chars each)

and I used a converted SimSun.ttf font   (i.e. to see if I can get swfc to generate a image that looks like text in a Word doc ...).

Here's the details:

.flash filename=" fontoutline1.sc" version=6
    .font SimSun "SimSun.swf"
    .textshape helloworld font=SimSun size=200% text="hello \uE8B4\uADE7\u89A9\uE7AF\uAEE5\u8886\uE69E\u90"
    .filled filled_helloworld outline=helloworld fill=blue line=3 color=green
    .put filled_helloworld

                               68656C6C6F20   hello wih a space
                     1st char  E8B4AD
                     2         e789A9
                     3         E7AFAE
                     4         E58886
                     5         E69E90

gives output:
C:\PlayerIn\sc>c:\swftools\swfc fontoutline1.sc -o font-zh1.swf
No char 59572 in font SimSun
No char 44519 in font SimSun
No char 59311 in font SimSun
No char 44773 in font SimSun
No char 59038 in font SimSun
No char 144 in font SimSun

and produces a swf with 2 Chinese chars (I think).

I think this may be 2 problems.  
    1. How to get the encoded chars into swfc?


     2.  Then for this example, mapping to a Font  or a converted font (SWF).

            I assume the issue is this.  If I don't use a font in the SWF for the chars , it will try to use a font on the running system.
            If this machine is a Chinese locale et al  ... then the text may display O.K.   but if the machine doesn't have the font
            then including it as in this example enables Flash to generate the text itself.

  Obviously, I'm lost and the above shows how much I don't understand.  

Thanks for any help or pointers. Examples too!

I appreciate the time and help!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]