Included are 2 scripts that are ostensibly identical. Try running them with XLua. "LuaVS" (saved with Visual Studio) runs fine, and "LuaCF2" (saved using CF2.5's edit box "save to file" action) gives an error "unexpected symbol near ÿ". Even outside of Lua files, this is probably not ideal. I haven't downloaded a hex editor to figure out what's there, but a clean text file would be best.
CF2.5's edit box and list objects append text files with extra data that breaks code.
Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
-
-
I've also run into this exact character being appended in one of my programs, I think I was also using XLua [edit: nope, but it is using text exchanged with an external process which could have similar issues]. I'll see if I can find it...
Edit
Ah yep here it is:
Please login to see this attachment.
I'm actually not even using an edit box, so that's really interesting.
I didn't work on this test further, because of this problem mostly. The program is supposed to be a GUI layer for PHP scripts so you can run them locally more easily.
I had thought maybe this had something to do with Unicode handling but I hadn't come up with ways to test that yet. The really interesting thing is that, at least for me, the character is only appended to the output sometimes (almost always but not quite always). It's very strange.
Here's the fully Event code from this example:
Code
Display More* On Window resize WebView2 : Set horizontal size to ClientWidth( "Window Control" ) WebView2 : Set vertical size to ClientHeight( "Window Control" ) - Height( "StatusBar" ) StatusBar : Set Y position to ClientHeight( "Window Control" ) - Height( "StatusBar" ) StatusBar : Set Dimensions to (ClientWidth( "Window Control" ), 25) StatusText : Set Y position to ClientHeight( "Window Control" ) - Height( "StatusBar" ) + 2 * Start of Frame File : Create the directory AppTempPath$ Special : Set tmpFile to AppTempPath$ + "output" + Str$(RRandom(11111111, 9999999)) + ".html" StatusText : Set alterable string to "temp file: " + tmpFile Special : Set cmdLine to " /c " + Appdir$ + "php\php.exe -r ""echo 'hello world';"" 1> " + tmpFile + " 2>&1" Special : Execute external program "cmd"cmdLine (wait,hide) Special : Set html to GetText$( "Textfile Object", tmpFile ) WebView2 : Load HTML=html File : Delete the file tmpFile * End of Frame File : Delete the directory AppTempPath$
-
Another interesting point, this is Please login to see this link. which is so suspicious of a hex value (0, the end of string marker in C; followed by 255, the max value of an unsigned byte) that I am really pretty sure it's either mis-handled Unicode data or buffer overflow maybe of some kind... but maybe I'm just on a wild goose chase.
-
character is only appended to the output sometimes
Does it depend on whether the string length is a multiple of 2 (i.e. only even, or only odd length)?
-
- Official Post
The file saved with with VS is ANSI, the one saved with Fusion is Unicode and starts with the UTF16 BOM (byte order mark, 2 bytes).
If you want the Edit Box and/or List Box to save either ANSI or UTF8 files without BOM, open the properties of your application, Runtime Options tab, and select either ANSI or UTF8 (without BOM) in Ouput in the Character Encoding section.
-
Does it depend on whether the string length is a multiple of 2 (i.e. only even, or only odd length)?
Good thought, but unfortunately it does not appear this is the case.
I ran it a few times today and I got the proper clean output and character count for "hello world" a few times:
Please login to see this attachment.
Then got the extra character and the character count (as returned by CTF's Len() expression) changed to 12. I checked the binary contents of the file, and it has neither a BOM nor any extra characters, exactly 11 bytes:
Please login to see this attachment.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!