[swfmill] I18N problem; fails to import external files that are named in non-Latin1 characters
matsuhashi@quick.co.jp
matsuhashi at quick.co.jp
Tue Mar 20 08:14:22 EST 2007
Hello, List
I experienced a I18N problem of swfmill-0.2.12. Let me report it.
I make this <movie> XML file. Please note the imported files have name in
"non latin" characters.
-----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<movie width="400" height="300" framerate="12">
<background color="#00CCFF"/>
<frame>
<library>
<clip id="logo" import="./ロゴ.swf"/>
<clip id="picture" import="./くま.jpg"/>
</library>
<place id="logo" name="logoHere" x="10" y="10" depth="1"/>
<place id="picture" name="pictureHere" x="10" y="100" depth="2"/>
</frame>
</movie>
-----------------------------------------------------------------------------
Swfmill fails to process this because it can not open the files to be
imported. Console message are as follows:
-----------------------------------------------------------------------------
[exec] swfmill 0.2.12
[exec] Reading from container.i18n.xml
[exec] ERROR: input is no SWF
[exec] no SWF loaded to save
[exec] runtime error: element apply-templates
[exec] swft:document() : could not parse SWF './'
-----------------------------------------------------------------------------
I read the source code and found the reason why this I18N problem occurs.
In swfmill-0.2.12/src/swft/swft.cpp , #155 line
-----------------------------------------------------------
unsigned char *swft_get_filename( xmlChar *filenameUTF ) {
int l = strlen((const char*)filenameUTF);
int l2 = l;
unsigned char *filename = (unsigned char *)malloc(l+1);
UTF8Toisolat1( filename, &l2, filenameUTF, &l ); //Oh! My
God!!
filename[l2] = 0;
return filename;
}
-----------------------------------------------------------
It seems that the swfmill-0.2.12 can import the external swf/jpg resources
only when those files are named in Latin-1 characters. It fails to open any
external files named in characters of my national language (Japanese, in my
case).
Well, that all what I have found until now. I will continue thinking about
this.
Anyone has idea what to do next?
MATSUHASHI,kazuaki
More information about the swfmill
mailing list