How to get the astronomic aries-Symbol in xlabel?

Hallo Scilab experts,
is there a way to put the astronomic aries-symbol into xlabel?
Regards Jens

Hello and welcome to Scilab’s Discourse.

This character is well defined in the Unicode system (“♈” U+2648 Aries Unicode Character) and its actual UTF-8 hexadecimal sequence is 0xE2 0x99 0x88. You can obtain this character with


--> ascii(hex2dec(["E2" "99" "88"]))

 ans = 

  "♈"

Anyway, Scilab handles UTF-8 strings natively, so you can copy/paste any Unicode character, e.g. from a web page, then use it as any other character:

clf
xstring(0.5,0.5,"Aries is ♈")
gce().font_size=10;
gce().text_box_mode="centered"

Thanks a lot, mottelet,
This works perfectly. The only flaw is that the symbol appears in the editor as a square what is somehow cryptic. The file is encoded in unicode>utf-8. Is there a remedy?

A way to make it easier to understand later would be:

aries=ascii(hex2dec(["E2" "99" "88"]))
zlabel('$'+aries+'$')

There seems to be an encoding problem here too! aries is enclosed in dollar characters between quotes.

Regards Jens

Verify that the encoding of ScilNotes is actually utf-8:

with Scilab 2024.1 Windows version, I can see the character:

You were faster.
I verified that the encoding of ScilNotes is actually utf-8. Encoding seems to be a general pain in the ass. I can live with the workaround which I wouldn’t have found without your help.

in that case you are rendering the string with the LaTeX interpreter, this is somewhat different form using the default text interpreter.

S.