This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-02-12 23:55:16

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Unicode characters?

how to create unicode characters based on character number? many copy/pasted characters in the source code show as a sequence of characters, useless for inserting unicode characters

Offline

 

#2 2013-02-13 01:18:59

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Unicode characters?

I'm not sure what you mean... are you saying some unicode characters don't work in Scratch? Because I think they all do...


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#3 2013-02-13 18:36:08

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: Unicode characters?

try the character 'ϕ' or 'Φ' (what I am trying to make)
the question is how to input them onto the blocks by the unicode number

Last edited by Interest (2013-02-13 18:37:04)

Offline

 

#4 2013-02-13 19:11:26

lemonpretzel
Scratcher
Registered: 2008-10-23
Posts: 100+

Re: Unicode characters?

You probably can't. You could just copy and paste the character instead, or possibly create two lists which map each unicode number to its symbol.

Offline

 

#5 2013-02-14 21:11:33

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Unicode characters?

Interest wrote:

try the character 'ϕ' or 'Φ' (what I am trying to make)
the question is how to input them onto the blocks by the unicode number

Both characters work for me in 1.4 and 2.0.


Posts: 20000 - Show all posts

Offline

 

#6 2013-02-14 21:53:33

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: Unicode characters?

lemonpretzel wrote:

You probably can't. You could just copy and paste the character instead, or possibly create two lists which map each unicode number to its symbol.

how?

veggieman001 wrote:

Interest wrote:

try the character 'ϕ' or 'Φ' (what I am trying to make)
the question is how to input them onto the blocks by the unicode number

Both characters work for me in 1.4 and 2.0.

I mean in the source code
it does work fine on dialogs, scratch text boxes, scratch variables, etc.

Offline

 

#7 2013-02-14 22:33:23

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Unicode characters?

Interest wrote:

veggieman001 wrote:

Interest wrote:

try the character 'ϕ' or 'Φ' (what I am trying to make)
the question is how to input them onto the blocks by the unicode number

Both characters work for me in 1.4 and 2.0.

I mean in the source code
it does work fine on dialogs, scratch text boxes, scratch variables, etc.

Oh.
Alt-232 and Alt-237 insert uppercase and lowercase phis, respectively, on Windows. It renders for me as a box in the system browser; I believe this is because that font doesn't support the symbol. However, it may display properly in the actual Scratch skin (I don't know enough to test or find out, though).


Posts: 20000 - Show all posts

Offline

 

#8 2013-02-17 17:17:24

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: Unicode characters?

veggieman001 wrote:

Interest wrote:

veggieman001 wrote:

Both characters work for me in 1.4 and 2.0.

I mean in the source code
it does work fine on dialogs, scratch text boxes, scratch variables, etc.

Oh.
Alt-232 and Alt-237 insert uppercase and lowercase phis, respectively, on Windows. It renders for me as a box in the system browser; I believe this is because that font doesn't support the symbol. However, it may display properly in the actual Scratch skin (I don't know enough to test or find out, though).

three things:
1. I am using a mac
2. copy/pasting gives two separate characters for me
3. in scratch skin, they load correctly (for example, in the variable names)

Offline

 

#9 2013-02-18 13:19:35

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Unicode characters?

You can create them from their character code using the Char class.

Offline

 

#10 2013-02-18 13:43:22

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: Unicode characters?

LS97 wrote:

You can create them from their character code using the Char class.

… from 1 to 255. However, Unicode character 981 cannot be created with the Character class.

Offline

 

#11 2013-02-19 11:45:32

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Unicode characters?

Interest wrote:

LS97 wrote:

You can create them from their character code using the Char class.

… from 1 to 255. However, Unicode character 981 cannot be created with the Character class.

Oh, ok. Then maybe (I haven't looked into this) you can use the UTF32 to some extent.

Offline

 

#12 2013-02-28 22:42:27

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: Unicode characters?

LS97 wrote:

Interest wrote:

LS97 wrote:

You can create them from their character code using the Char class.

… from 1 to 255. However, Unicode character 981 cannot be created with the Character class.

Oh, ok. Then maybe (I haven't looked into this) you can use the UTF32 to some extent.

the problem is, I don't know how

Offline

 

#13 2013-02-28 23:05:05

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Unicode characters?

Interest wrote:

veggieman001 wrote:

Interest wrote:


I mean in the source code
it does work fine on dialogs, scratch text boxes, scratch variables, etc.

Oh.
Alt-232 and Alt-237 insert uppercase and lowercase phis, respectively, on Windows. It renders for me as a box in the system browser; I believe this is because that font doesn't support the symbol. However, it may display properly in the actual Scratch skin (I don't know enough to test or find out, though).

three things:
1. I am using a mac
2. copy/pasting gives two separate characters for me
3. in scratch skin, they load correctly (for example, in the variable names)

Remap your keyboard layout to include phi temporarily?


Posts: 20000 - Show all posts

Offline

 

#14 2013-03-03 20:32:31

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: Unicode characters?

veggieman001 wrote:

Interest wrote:

veggieman001 wrote:

Oh.
Alt-232 and Alt-237 insert uppercase and lowercase phis, respectively, on Windows. It renders for me as a box in the system browser; I believe this is because that font doesn't support the symbol. However, it may display properly in the actual Scratch skin (I don't know enough to test or find out, though).

three things:
1. I am using a mac
2. copy/pasting gives two separate characters for me
3. in scratch skin, they load correctly (for example, in the variable names)

Remap your keyboard layout to include phi temporarily?

1. how?
2. probably won't work (see point #2 above)

Offline

 

#15 2013-03-04 10:55:42

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Unicode characters?

Are you trying to use this in a block? Because if so, you can go around the problem by imitating the turn cw X degrees motion block (since it has a little image instead of the word clockwise).

To do that there is a method in CommandBlockMorph I think.

Offline

 

Board footer