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

Get unicode of bullet-character

Guest
Jun 08, 2011 Jun 08, 2011

Hi,

I want to export the unicode value of bullets in paragraph styles.

I can get some kind of value by

paragraphstyle.bulletChar.characterValue

even though the charactertype is UNICODE_ONLY it's no unicode, it might be the glyph id, but I'm not sure about that.

However, is there a way to get the unicode value of the bullet?

Thanks in advance

TOPICS
Scripting
1.2K
Translate
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
Mentor ,
Jun 08, 2011 Jun 08, 2011

Use String.fromCharCode() to convert a unicode code point (number) to the matching character:

String.fromCharCode(app.activeDocument.paragraphStyles.lastItem().bulletChar.characterValue)

Dirk

Translate
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
Guest
Jun 09, 2011 Jun 09, 2011

Thanks for your answer.

This is really helpful, however, I want to write the bullet-character into an html-file so therefore I was hoping to get some kind of Notation or Code for special characters such as:

• or •

instead of the actual character (•).

Is that even possible?

Translate
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
Mentor ,
Jun 09, 2011 Jun 09, 2011
LATEST

I don't understand your problem.

If you really intend to reinvent the existing export for XHTML (also known as "Export for Dreamweaver"), you'd either use the numeric values within an entity reference, as you already have them, or look up the translation, or specify an appropriate charset in the Content-Type meta data matching your file encoding. But all of that has nothing to do with InDesign, instead you need a basic knowledge of web standards.

Dirk

Translate
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