Open GoogleCodeExporter opened 9 years ago
Actually, I finally managed to boil it down into a better test case, this
involving the simulator, with optimizations turned off:
//This line of code should store (length=1)
//In lslforge, length ends up becoming 3
integer length = llStringLength(llUnescapeURL("%e4%a9%a5"));
Original comment by guri.li...@gmail.com
on 7 May 2012 at 8:47
Internally the plugin forces all scripts to UTF-8 format, which is almost
certainly the cause of this issue. We want to ensure LSLForge behaves the same
as the SL viewer's editor, so will attempt to fix in a near future release.
In the meantime, you might be able to get around the issue by representing the
naughty parts with escaped code - for example: \u1234, whatever code is correct.
Original comment by elnew...@gmail.com
on 11 May 2012 at 12:38
> In the meantime, you might be able to get around the issue by representing
the naughty parts with escaped code - for example: \u1234, whatever code is
correct.
Correct me if I'm wrong, but this will only help for string literals, and only
in lslforge, but fail in SL right?
Original comment by guri.li...@gmail.com
on 11 May 2012 at 1:29
Same/similar issue?
The string literal "\;" normally becomes just ; when compiled and run in SL
but LSLForge changes it in the .lsl to "\\;" which becomes \; in SL, altering
script behavior.
Easy to avoid, but took me a while to figure out what's going on
Original comment by gmau...@beyondtechsl.com
on 31 Jul 2012 at 11:08
I could be wrong, but this sounds like a completely different bug to me. Mine
is related to the character-set of the variables. Yours sounds more like
something wrong is the /quoting/escaping code.
Original comment by guri.li...@gmail.com
on 1 Aug 2012 at 12:24
LSLForge has bugs on implementation of llEscapeURL and llUnescapeURL. It was caused by difference of string internal format between SL and LSLForge. SL keeps strings internally in UTF-8 format, but LSLForge keeps in UTF-32(I guess). llEscapeURL and llUnescapeURL didn't have format conversion.
It took a bit time because sample script was a bit long, but finally I could fix it.
Here's the patch file for this problem, please check it out and let me know any bugs.
See 'Building the Native Executable' of http://lslplus.sourceforge.net/installation.html to build LSLForge.
It says to use GHC 6.10.1 or later, but you can't compile LSLForge or LSLPlus on 6.12.*. or later. I'm using 6.10.4.
Use it your own risk but I hope it works well for you.
By the way, I was so surprised LSLForge had so powerful optimization. The line 'string testStr = uncompressAscii(compressAscii("test"));' was optimized to 'string testStr = "test";'. It's so cool.
Original comment by pells...@gmail.com
on 30 Mar 2014 at 10:44
Attachments:
I'm sorry, but I don't actually have SL, or Eclipse installed anymore. I'll
see if I can get it running to test sometime next week. For now, here was the
general idea of what I was eventually planning to do.
My goal was to make a "compress" function that was carefully written to be
pure, that the optimizer would optimize away, and then write a "Uncompress"
that the optimizer is told not to touch. By writing a string this way, I could
save space in a program that holds a lot of big strings:
decompress(compress("Really long string here"))
The compress function would have mostly worked just by mashing each pair of
UTF-8 characters into a single UTF-16 characters, rather than something longer
and more complicated.
Original comment by guri.li...@gmail.com
on 30 Mar 2014 at 2:14
Original issue reported on code.google.com by
guri.li...@gmail.com
on 7 May 2012 at 5:33