• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

UTF Encoding / Unicode in Script UI (ExtendScript)

Participant ,
Oct 16, 2020 Oct 16, 2020

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):

UTF_Temp.jpg

 

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

TOPICS
How to , Scripting , SDK

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 16, 2020 Oct 16, 2020

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 16, 2020 Oct 16, 2020

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 22, 2020 Oct 22, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Yes, adding a comment with Unicode characters as first line worked for me. THANK YOU!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 08, 2022 Aug 08, 2022

Copy link to clipboard

Copied

Awesome, sure thing!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 24, 2023 Oct 24, 2023

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

LATEST

Seriously though, it's this kind of thing that makes coding feel like some fickle arcane magic or alchemy sometimes... 😅

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines