jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.5k stars 745 forks source link

Unicode Block Should be Renamed ASCII #86

Closed cycomachead closed 11 years ago

cycomachead commented 11 years ago

Does the Unicode (num) as letter block in Snap! behave any differently than in BYOB? Right now it seems to be doing the exact same thing as the ASCII block, operating on those values, not the unicode ones.

http://unicode-table.com/en/#0041 Unicode A is 0041, but Snap! returns ')' for the input 0041, which is the correct ASCII version.

If this is the case, it seems like the unicode blocks should be renamed to be ASCII code.

nathan commented 11 years ago

"A" is 65 in both ASCII and Unicode (that table lists the hexadecimal value, 0x0041). But Snap! is definitely using Unicode: try, e.g., 8230—you get an ellipsis.

cycomachead commented 11 years ago

D'oh, got it. That makes sense!

Is there a way then to enter unicode, non-ASCII symbols in the the unicode of (char) block? I had tried doing that an it had seemed like that only accepts ascii chars, but it does report back the correct unicode value for a character when entered from the unicode (num) as letter block.

nathan commented 11 years ago

Not unless you have a key mapping for them (on Windows you might be able to use alt + the code point on the number pad).

cycomachead commented 11 years ago

I've tried using the OS X key mappings for a few different characters and had no luck. Perhaps it's a browser issue then?

On Thursday, May 2, 2013, Nathan Dinsmore wrote:

Not unless you have a key mapping for them (on Windows you might be able to use alt + the code point on the number pad).

— Reply to this email directly or view it on GitHubhttps://github.com/jmoenig/Snap--Build-Your-Own-Blocks/issues/86#issuecomment-17371727 .

Michael Ball From my iPhone http://michaelballphoto.com

nathan commented 11 years ago

Yeah, that's possible. Dead keys don't work (see #4), but most other characters work for me on Chrome/OS X (e.g. ⌥: = …).

cycomachead commented 11 years ago

Interesting. It appears at lot of these are Safari issues. I can paste fine in chrome. Keyboard shortcuts appear to be completely broken in safari.