Copy link to clipboard
Copied
I'm trying to spice up my Script UI Panels with some Unicode symbols. Some work great out of the box e.g. the "recycling" or "reload" Button \u21BA or most of the other arrows, some won't work at all. At the moment I have problems with this specific symbol:
Thats \u1F5D7 (overlap window symbol):
Should look like this:
Is there some kind of UTF Encoding I can set in my script like I would for a website with js?
Here are the codes for I'm testing (and struggling) with: http://www.fileformat.info/info/unicode/char/1f5d7/index.htm
Copy link to clipboard
Copied
Perhaps you're simply a victim of the typical general Unicode/ OpenType issues where so much hinges on which language settings and text composers are active because they are not core functions in the program code. Either way, I wouldn't trust this even if it worked and simply create this stuff as custom icons.
Mylenium
Copy link to clipboard
Copied
Yeah, I agree with you all the way. I found something thats quite similar and works for me in the meantime (\u2750) but its weird why some work and some do not...
Thx as alway Mylenium for the fast response!
Copy link to clipboard
Copied
There's a workaround for this. I believe you have to put a string at the top of your document with a character that only appears in unicode, that way the parser knows to read your script in unicode.
Copy link to clipboard
Copied
Yes, adding a comment with Unicode characters as first line worked for me. THANK YOU!
Copy link to clipboard
Copied
Awesome, sure thing!
Copy link to clipboard
Copied
Phew, this saved me from a sleepless night. For some reason, my script suddenly started breaking around Unicode characters... I thought I was going crazy until I stumbled on your comment.
I can only guess that through sheer luck I had a Unicode character near the top of my document before, until some changes I made inadvertently moved it too far down? In any case: your workaround worked. Thank you!
Copy link to clipboard
Copied
Seriously though, it's this kind of thing that makes coding feel like some fickle arcane magic or alchemy sometimes... 😅