Discuss Scratch

awesome-llama
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

ASCII Control Characters (Edit: and Unicode) cause weird behaviour inside of Scratch's 3.0 online editor. I am referring to these control characters (https://www.fileformat.info/info/unicode/category/Cc/list.htm), specifically , which is U+001F INFORMATION SEPARATOR ONE.
What I have noticed, is that scratch blocks will get deleted if they contain this or any other control characters. This can be tested by pasting one into a block input, then going to another sprite and switching back. You will notice that the block has disappeared.

gif:


This may be some intended feature, but below definitely isn't:
I have broken the join block with this thing (although I don't know how to recreate this again, even though it was caused by the same steps as above. Seems to happen every first attempt, after a reload possibly):

The white part was where  was pasted into, the right input was text, but it has now turned green. It still works, but reports undefined instead. This join block reports back “undefined”. You can still put blocks into it, though.

EDIT: Unicode characters also cause this issue. This is more important that I previously thought as it may effect other languages typed into Scratch.
——

My browser / operating system: Windows NT 10.0, Chrome 73.0.3683.103, No Flash version detected

Last edited by awesome-llama (April 15, 2019 11:46:01)



banana439monkey
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

That's definitely not intended. Can you send over the script (along with the define script) used? This is both intriguing and perplexing.

Banana

Very inactive user who has now become a maker.
If you reply to this post it would be greatly appreciated if you could comment the link to your post on my profile!!!
awesome-llama-test
Scratcher
100+ posts

ASCII Control Characters and Unicode cause weird behaviour

banana439monkey wrote:

That's definitely not intended. Can you send over the script (along with the define script) used? This is both intriguing and perplexing.

Banana
I put the broken blocks here: https://scratch.mit.edu/projects/302504830/

This is awesome-llama's test account.
banana439monkey
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

awesome-llama-test wrote:

banana439monkey wrote:

That's definitely not intended. Can you send over the script (along with the define script) used? This is both intriguing and perplexing.

Banana
I put the broken blocks here: https://scratch.mit.edu/projects/302504830/
Can you also send over the custom blocks?

Banana

Very inactive user who has now become a maker.
If you reply to this post it would be greatly appreciated if you could comment the link to your post on my profile!!!
awesome-llama
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

banana439monkey wrote:

awesome-llama-test wrote:

banana439monkey wrote:

That's definitely not intended. Can you send over the script (along with the define script) used? This is both intriguing and perplexing.

Banana
I put the broken blocks here: https://scratch.mit.edu/projects/302504830/
Can you also send over the custom blocks?

Banana
What custom blocks? The block is just a broken join block, which you can find in the project link.


banana439monkey
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

awesome-llama wrote:

banana439monkey wrote:

awesome-llama-test wrote:

banana439monkey wrote:

That's definitely not intended. Can you send over the script (along with the define script) used? This is both intriguing and perplexing.

Banana
I put the broken blocks here: https://scratch.mit.edu/projects/302504830/
Can you also send over the custom blocks?

Banana
What custom blocks? The block is just a broken join block, which you can find in the project link.
In the GIF, there appeared to be a custom block.

Banana

Very inactive user who has now become a maker.
If you reply to this post it would be greatly appreciated if you could comment the link to your post on my profile!!!
awesome-llama
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

I found out that other characters cause this issue- not just control characters. Take https://www.compart.com/en/unicode/U+1091F which also causes the issue.

Edit: and apparently in the forum posts as well. I cannot even post it here because it gets deleted.

Last edited by awesome-llama (April 15, 2019 11:49:20)



awesome-llama
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

Bump

Today, I discovered I lost about half an hour of work, after loading up my project. Likely due to this same issue (I was using unicode characters), a whole custom block has disappeared. I loaded it up today (after working on it yesterday), and the custom block is gone. I know it was saved, because the stack block is still there, but the hat is completely gone! I have looked around, but the script is no where to be seen.

Last edited by awesome-llama (April 16, 2019 08:21:32)



banana439monkey
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

awesome-llama wrote:

Bump

Today, I discovered I lost about half an hour of work, after loading up my project. Likely due to this same issue (I was using unicode characters), a whole custom block has disappeared. I loaded it up today (after working on it yesterday), and the custom block is gone. I know it was saved, because the stack block is still there, but the hat is completely gone! I have looked around, but the script is no where to be seen.
Seeing that, I'm probably going to mark this bug as critical.

Banana

Very inactive user who has now become a maker.
If you reply to this post it would be greatly appreciated if you could comment the link to your post on my profile!!!
kysk219dhsaek102
Scratcher
79 posts

ASCII Control Characters and Unicode cause weird behaviour

https://scratch.mit.edu/projects/319146521


This is my profile

rainbows keep kumquats away
it is true
mybearworld
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

Bump. It's still there!

Signatures are the only place where assets links still work.
GoogleInScratch
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

kysk219dhsaek102 wrote:

https://scratch.mit.edu/projects/319146521
Please don't advertise here. Do it in Show and Tell.

I moved to DualPikachu, meet me there!
RealChutacoPlayz
Scratcher
100+ posts

ASCII Control Characters and Unicode cause weird behaviour

This glitch still exists. And… if you rename a sound to  or costume to , the block palette becomes shortened.

What will you do on Kirby's 30th anniversary?
Sorry, an evil kumquat hacked my account and keeps changing my signature
awesome-llama
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

This topic was bumped up so I decided to experiment with it again.



Well that's weird:


Duplicating it does this:


It also still functions as a join block, as you can plug in blocks to it.


Works on other blocks too:




Now here's some new information:


It appears the characters are stored in the block (this is the set random block, but with the characters pasted in to both inputs). There is a 001f which is the code for the character I pasted in. I don't entirely understand the function of the \t and \u. I think \u means Unicode and \t is tab, but for tab, I don't know why it is there.

It seems that to make the blank fields, they need to contain null.


Edit:
Wait a minute… You can put in a lot more characters. I inserted a tab with \t and an A with \u0041. This is interesting because perhaps there are more things that can be done through manually putting in characters. Perhaps more hacky things.


Edit 2:






Wow, RTL override works too!


Last edited by awesome-llama (Feb. 27, 2021 14:45:50)



-CloudGate-
Scratcher
1000+ posts

ASCII Control Characters and Unicode cause weird behaviour

this needs to be fixed for a project I'm making



box of Asian citrus psyllids and please give me an internet here

Powered by DjangoBB