Back screen bug and ipad versions

Hello @Dave1707 and @Simeon i have question for both of you.
Dave you have solved the ‘black screen bug’ on ipad1 when pasting a project with tAbs into a new project. You found Codea inserts at this moment ASCII code 194 and code 160 (that are invisible from the editor) and this mess with compilation and running. I have added this into XFC so when i start a project, i automatically remove those 2 ASCII characters (as you did). It works fine on my ipad1. My question is: will it be ok on other ipads too? Or will it create problems for Codea on these ipads? I guess @Simeon has the answer? If it creates pb for others, i will make this an option. If it is ok, i will let it run.
Thanks for your help.

@Jmv38 That would be an @Simeon answer. I also hope it’s fixed in the next version because I have problems with that anytime I “paste into a project”.

Hmm ASCII code 194 is “?” and 160 is “á”. I suspect they might be invisible unicode characters instead? (i.e., non breaking space, joiner, and others).

@Simeon If you need an example, copy the first code and “add new project”.


--# Main

function setup()
    test()
end

--# test

function test()
    print("test")
end

The Main tab in the new project after the “add new project”.


function setup()
    test()
end

Hex dump of the new project Main tab. You can see the hex ‘c2’ and hex ‘a0’ being added before the two hex ‘20’ values.

0a 66 75 6e 63 74 69 6f 6e 20 73 65 74 75 70 28 29 0a c2 a0 20 c2 a0 20 74 65 73 74 28 29 0a 65 6e 64 0a 0a

Thank you for your answer. I’ securize it by removing the group of 2 .characters. Looks like Simeon is not really aware of this bug, so i’ll make it an XFC option.
Btw, thank you SO MUCH @Dave1707 for having solved the pb and shared your code: i have used it more than 100 times so far!

Thanks for posting that @dave1707, I’ve pasted this into a new project under iOS 6 and it appears to work — does this only happen under iOS 5? I am unable to test under iOS 5 so it might be tricky to fix.