|
|||
|
I know of flash problem with UTF 8 support for input fields, - I have downloaded Your example of "save text file" and it doesn't catch characters... I know there's a workaround in flash with listening to keypresses but - is there a way you will solve this in future releases ? I need to know!
I have previously downloaded Your software - a year or so and I haven't downloaded new version yet for testing but I am interested now in buying swf2exe software since I need it for upcoming multimedia projects. Thank You in advance... |
|
|||
|
Yes.
That's what I always wanted to have in flash. For example: Dutch, French, Hungarian etc. language specific characters. When You're developing Win platform app for large number of users that's what You need desperately... I have downloaded trial but hadn't got much time to learn more about your scripting language. Just a touch of it and I like the output very much - it's a light weight application... well.. Do You have any idea about language input ? |
|
|||
|
Code:
function toUTF8(string)
{
var i;
var stream = new StringStream;
for (i = 0; i < string.length; i++)
{
var code = string.charCodeAt(i);
if (code < (1 << 7))
{
stream.put(code);
}
else if (code < (1 << 11))
{
stream.put((code >> 6) | 0xC0);
stream.put((code & 0x3F) | 0x80);
}
else if (code < (1 << 16))
{
stream.put(0xE0 | ((code >> 12) & 0x0F));
stream.put(0x80 | ((code >> 6) & 0x3F));
stream.put(0x80 | (code & 0x3F));
}
else if (code < (1 << 21))
{
stream.put((code >> 18) | 0xe0);
stream.put(((code >> 12) & 0x3f) | 0x80);
stream.put(((code >> 6) & 0x3f) | 0x80);
stream.put((code & 0x3f) | 0x80);
}
}
return stream;
}
var str = '<project name="test" default="init" basedir=".">' +
' <target name="init">' +
' <!-- displays Hello in Chinese -->' +
' <echo message="The chinese word is: 世纪"/>' +
' </target>' +
'</project>';
var f = new FileStream("c:\\1.xml", "w");
f.writeLine('<?xml version="1.0" encoding="UTF-8"?>');
f.write(toUTF8(str));
f.close();
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|