[prev in list] [next in list] [prev in thread] [next in thread]
List: swftools-common
Subject: [Swftools-common] Re: your response on DBCS and SWF / UTF-8
From: "Bill Hall" <wrh099 () gmail ! com>
Date: 2006-08-13 14:54:24
Message-ID: efdee1740608130754l6b7bda4bve4dd4e684207dfff () mail ! gmail ! com
[Download RAW message or body]
Matthias,
Thanks for the answers. They help!
> 1.) swfc will accept UTF-8 encoded files, but only without a DOM.
> That could be considered a bug, so I'm putting this on my TODO list.
> Could you please send me one of your test files (one of the ones
> with a DOM at the start?)
I'll send a file that includes the BOM (byte order mark) for UTF-8 on the
front.
Yes I tried it and it works without the BOM.
2.) swfc uses the Actionscript compiler von the Ming Flash library.
> While normal swfc syntax (e.g. textshape) support's both UTF-8 input
> and escaped Unicode (\uxxxx), I'm not sure about the Actionscript
> compiler. (Anything between the .action: and the .end is processed
> by a different lexer and grammar)
>
> What would probably work (didn't try it) is to escape not the
> Unicode, but the UTF-8:
> Instead of
> this.Controls.titled = "DB2 \u8D2D\u7269\u7BEE\u5206\u6790"
> write
> this.Controls.titled = "DB2
> \xe2\xb6\x8d\xe6\xa5\xb2\xee\xb9\xbb\xd9\x92\xe9\x81\xa7"
>
> with the latter being the byte-encoded UTF8 version of the UTF16
> data of the original line.
2A.
Actually, if I did this test correctly , it didn't compile.
This file:
.flash name="variablezh1x.swf" version=6
.action:
this.controls.frameRate = 15;
this.Controls.titled = "DB2
\xe2\xb6\x8d\xe6\xa5\xb2\xee\xb9\xbb\xd9\x92\xe9\x81\xa7"
.end
.end
gave Error messages:
this.Controls.titled = "DB2
\xe2\xb6\x8d\xe6\xa5\xb2\xee\xb9\xbb\xd9\x9
\xe9\x81\xa7"
^
warning:
^
Line 0005: Reason: 'unsupported escape sequence'
warning:
Line 0005: Reason: 'unsupported escape sequence'
error:
Line 7: Reason: 'Unexpected EOF found while looking for input.'
"variablezh1x.sc", line 2 column 12: error- Couldn't compile ActionScript
2B.
the original unicode escaped file gives warning messages, I assume this was
due to the font issues
but seems to compile. Is the data there? It seems to be via a swfdump but
maybe I misunderstand.
i.e.
.flash name="variablezh1.swf" version=6
.action:
this.controls.frameRate = 15;
this.Controls.titled = "DB2
\uE8B4\uADE7\u89A9\uE7AF\uAEE5\u8886\uE69E\u90";
.end
.end
gives warning.
warning:
this.Controls.titled = "DB2 \uE8B4\uADE7\u89A9\uE7AF\uAEE5\u8886\u
90"
^
warning:
^
Line 0005: Reason: 'unsupported escape sequence'
warning:
Line 0005: Reason: 'unsupported escape sequence'
"variablezh1.sc", line 6 column 1: warning- Empty bounding box for movie
seems to compile with warnings.
3.) The problem you wrote in the other mail:
>
> 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
>
> suggests that the UTF8 encoding itself worked (59572 = \xe8b4), but
> there was a problem in the font.
> Could you send me both the SimSun.ttf file as well as the converted
> font (SimSun.swf)? Thanks!
I'll send the files but I resolved this issue (I think).
fontoutline1.sc gave the above error messages. This was caused by my
unicode encoding the
UTF-8 not the result unicode strings.
the wrong file is: fontlutline1.sc :
.flash filename="fontoutline1.sc" version=6
.font SimSun "SimSun.swf"
.textshape helloworld font=SimSun size=200% text="DB2
\uE8B4\uADE7\u89A9\uE7AF\uAEE5\u8886\uE69E\u90"
.filled filled_helloworld outline=helloworld fill=blue line=3
color=green
.put filled_helloworld
.end
fontoutlinezh2.sc works. It is:
.flash filename="fontoutlinezh2.sc" version=6
.font SimSun "SimSun.swf"
.textshape helloworld font=SimSun size=200% text="Hello
\u8D2D\u7269\u7BEE\u5206\u6790"
.filled filled_helloworld outline=helloworld fill=blue line=3
color=green
.put filled_helloworld
.end
Greetings
>
> Matthias
>
>
>
[Attachment #3 (text/html)]
<span id="_user_kramm@quiss.org">Matthias,<br><br> Thanks for the answers. They \
help!<br></span><br><div><span class="gmail_quote"></span><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <br>1.) swfc will accept UTF-8 encoded files, but \
only without a DOM.<br> That could be considered a bug, so I'm \
putting this on my TODO list.<br> Could you please send me one \
of your test files (one of the ones<br> with a DOM at the \
start?)</blockquote><div><br><br>I'll send a file that includes the BOM (byte \
order mark) for UTF-8 on the front.<br>Yes I tried it and it works without the BOM. \
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> 2.) swfc uses the \
Actionscript compiler von the Ming Flash library.<br> While \
normal swfc syntax (e.g. textshape) support's both UTF-8 \
input<br> and escaped Unicode (\uxxxx), I'm not sure about the \
Actionscript<br> compiler. (Anything between the .action: and \
the .end is processed <br> by a different lexer and \
grammar)<br><br> What would probably work (didn't try it) is \
to escape not the<br> Unicode, but the \
UTF-8:<br> Instead \
of<br> this.Controls.titled = \
"DB2 \u8D2D\u7269\u7BEE\u5206\u6790" \
<br> write<br> this.Controls.titled \
= "DB2 \xe2\xb6\x8d\xe6\xa5\xb2\xee\xb9\xbb\xd9\x92\xe9\x81\xa7"<br><br> with \
the latter being the byte-encoded UTF8 version of the \
UTF16<br> data of the original line. \
</blockquote><div><br>2A.<br> Actually, if I did this test correctly , it \
didn't compile.<br><br>This file:<br>.flash name="variablezh1x.swf" \
version=6<br> \
.action:<br> this.controls.frameRate = \
15;<br> this.Controls.titled = "DB2 \
\xe2\xb6\x8d\xe6\xa5\xb2\xee\xb9\xbb\xd9\x92\xe9\x81\xa7"<br> \
.end<br>.end<br><br>gave Error \
messages:<br> this.Controls.titled = \
"DB2 \xe2\xb6\x8d\xe6\xa5\xb2\xee\xb9\xbb\xd9\x9 \
<br>\xe9\x81\xa7"<br><br><br> \
^<br>warning:<br><br> \
^<br><br>Line 0005: Reason: 'unsupported escape sequence'<br>warning:<br>Line \
0005: Reason: 'unsupported escape sequence'<br>error:<br>Line 7: Reason: \
'Unexpected EOF found while looking for input.' <br>"<a \
href="http://variablezh1x.sc">variablezh1x.sc</a>", line 2 column 12: error- \
Couldn't compile ActionScript<br><br>2B.<br> the original unicode escaped file \
gives warning messages, I assume this was due to the font issues <br>but seems to \
compile. Is the data there? It seems to be via a swfdump but maybe I \
misunderstand.<br><br>i.e. <br>.flash name="variablezh1.swf" \
version=6<br> \
.action:<br> this.controls.frameRate = 15; \
<br> this.Controls.titled = "DB2 \
\uE8B4\uADE7\u89A9\uE7AF\uAEE5\u8886\uE69E\u90";<br> \
.end<br>.end<br><br>gives \
warning.<br><br>warning:<br> \
this.Controls.titled = "DB2 \uE8B4\uADE7\u89A9\uE7AF\uAEE5\u8886\u \
<br>90"<br><br><br> ^<br>warning:<br><br> ^<br><br>Line 0005: \
Reason: 'unsupported escape sequence'<br>warning:<br>Line 0005: Reason: \
'unsupported escape sequence'<br>"<a href="http://variablezh1.sc">variablezh1.sc \
</a>", line 6 column 1: warning- Empty bounding box for movie<br><br>seems to \
compile with warnings.<br></div><br><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> 3.) The problem you wrote in the other \
mail:<br><br> C:\PlayerIn\sc>c:\swftools\swfc <a \
href="http://fontoutline1.sc">fontoutline1.sc</a> -o \
font-zh1.swf<br> No char 59572 in font \
SimSun<br> No char 44519 in font SimSun \
<br> No char 59311 in font \
SimSun<br> No char 44773 in font \
SimSun<br> No char 59038 in font \
SimSun<br> No char 144 in font \
SimSun<br><br> suggests that the UTF8 encoding itself worked \
(59572 = \xe8b4), but <br> there was a problem in the \
font.<br> Could you send me both the SimSun.ttf file as well \
as the converted<br> font (SimSun.swf)? \
Thanks!</blockquote><div><br><br> I'll send the files but I resolved this \
issue (I think). <br> <a \
href="http://fontoutline1.sc">fontoutline1.sc</a> gave the above error \
messages. This was caused by my unicode encoding the<br> UTF-8 not \
the result unicode strings.<br><br> the wrong file is: <a \
href="http://fontlutline1.sc"> fontlutline1.sc</a> :<br> .flash \
filename="<a href="http://fontoutline1.sc">fontoutline1.sc</a>" \
version=6<br> .font SimSun \
"SimSun.swf"<br> .textshape helloworld font=SimSun \
size=200% text="DB2 \uE8B4\uADE7\u89A9\uE7AF\uAEE5\u8886\uE69E\u90" \
<br> .filled filled_helloworld outline=helloworld fill=blue line=3 \
color=green<br> .put filled_helloworld<br>.end<br><br><br><a \
href="http://fontoutlinezh2.sc">fontoutlinezh2.sc</a> works. It \
is:<br><br><br>.flash filename=" <a \
href="http://fontoutlinezh2.sc">fontoutlinezh2.sc</a>" \
version=6<br> .font SimSun \
"SimSun.swf"<br> .textshape helloworld font=SimSun \
size=200% text="Hello \u8D2D\u7269\u7BEE\u5206\u6790"<br> \
.filled filled_helloworld outline=helloworld fill=blue line=3 \
color=green<br> .put \
filled_helloworld<br>.end<br><br></div><br><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> Greetings<br><br>Matthias<br><br><br></blockquote></div><br>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic