Math Symbols Not Displaying Correctly

262 views
Skip to first unread message

Learner00

unread,
Jun 9, 2015, 11:19:29 AM6/9/15
to blo...@googlegroups.com
I followed the instructions for creating a Blockly editor, but the math symbols do not display correctly. Is there something I need to add to display them?
(When I open a Blockly demo file, it does display correctly.)


Neil Fraser

unread,
Jun 12, 2015, 1:54:00 PM6/12/15
to blo...@googlegroups.com
The attached image (presumably a screenshot) on your post is not visible.  Can you post again?  Thanks.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Learner00

unread,
Jun 12, 2015, 2:42:45 PM6/12/15
to blo...@googlegroups.com

Below's a screenshot, here's a link.

Neil Fraser

unread,
Jun 12, 2015, 3:01:28 PM6/12/15
to blo...@googlegroups.com
Wow.  What platform are you on (operating system and browser)?

You can modify these lines in msg/messages.js:
304: Blockly.Msg.MATH_DIVISION_SYMBOL = '÷';
306: Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = '×';
And change them to something your computer can render, such as '*' and '/'.  Then recompile with build.py.

If you can't get the build to work, then modify msg/js/en.js directly (currently lines 192 and 204).


--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Learner00

unread,
Jun 12, 2015, 3:38:12 PM6/12/15
to blo...@googlegroups.com
Thanks, changing the symbols in msg/js/en.js worked.

I'm on Mac OS 10.10.2 Chrome 43.0. 

The math symbols displayed correctly for the included demo files, so not sure what happened with my file. 


On Tuesday, June 9, 2015 at 11:19:29 AM UTC-4, Learner00 wrote:

Neil Fraser

unread,
Jun 12, 2015, 4:58:48 PM6/12/15
to blo...@googlegroups.com
Does your file specify an ISO character set, something like this:
<meta charset="iso-8859-1">

Blockly assumes that it will be on a Unicode page:
<meta charset="utf-8">

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Learner00

unread,
Jun 14, 2015, 11:18:22 PM6/14/15
to blo...@googlegroups.com
Adding <meta charset="utf-8"> solved the issue. Thanks!


On Tuesday, June 9, 2015 at 11:19:29 AM UTC-4, Learner00 wrote:
Reply all
Reply to author
Forward
0 new messages