Accidental character in the Windows function Editor

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Accidental character in the Windows function Editor

Postby ray on Tue Apr 09, 2024 2:41 pm

I am writing code relating to music, and am having a minor problem with the accidentals symbols '♭♮♯' (Unicode chars 9837 9838 9839) within the Windows function editor.

The following code appears in a function dealing with buttons to add them. Note the Captions:

Code: Select all
 f n s←'♭♮♯'
  ''⎕WC'Button'(push)('Caption' ' ♯ ')('Posn'(frow(uw[2])))('Event' 'Select' 1)('FontObj' 'font')
 'Score.flat'⎕WC'Button'(push)('Caption' ' ♭ ')('Posn'(frow(uw[3])))('Event' 'Select' 1)('FontObj' 'font')
 'Score.natural'⎕WC'Button'(push)('Caption' ' ♮  ')('Posn'(frow(uw[4])))('Event' 'Select' 1)('FontObj' 'font')

I am using copying and pasting to get these glyphs into the editor.

It all appears to work, but within the editor these symbols they frequently convert to a small black square, but still appear correctly on the button within the form when displayed on screen.

Currently, every time I open the function in the editor, the final ' ♮ ' appear as the small black square. (NOTE I copied that string from the editor and pasted to here where it appears correctly.)

I know I can simply replace these glyphs via using
Code: Select all
⎕UCS 9837 9838 9839
, but the function is much easier to read if I can use the glyphs directly.

Any suggestion ?

Thanks Ray
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
Posts: 224
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: Accidental character in the Windows function Editor

Postby Vince|Dyalog on Wed Apr 10, 2024 8:17 am

Hi Ray,

I can see those characters OK in Dyalog 19.0 and font APL385 Unicode on MS Windows 10.

What version are you running?

What version of Windows are you running on?

I would also suggest trying another font.

Arial or Lucida Sans Unicode, just to see if those characters display.

I also use Iosveka. You can find a list of fonts to use for APL here:

⎕se.⎕wg 'font'
Iosevka Term SS10 MdEx 40 1 0 0 500 0 0


Posts: 414
Joined: Wed Oct 01, 2008 9:39 am

Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest