Copy link to clipboard
Copied
I've got a routine that makes a list of headlines & sorts them, which ends up as bookmarks. When a headline contains an anchored object, the resulting text includes a glyph, a tiny dotted box with 'OBJ' in it, which looks bad in the final list of bookmarks. Using string.charAt(x) for the character returns 65532.
I suppose I could write a function that loops through the sentence's characters & discards any 65532, but that seems like overkill if there's a regexp replace string. I already run string.replace(/\s+/g, " ") to replace non-space invisible ctrl characters w/space, but that pattern doesn't affect the object character. Does this ring a bell with anyone?
Thanks.
1 Correct answer
It's the "Anchored object marker" (InDesign name) or "Object replacement character" (Unicode name) . 65532 in hexadecimal is FFFC, so in java/javascript unicode notation it is "\uFFFC".
myString = myString.replace(/\uFFFC/,"");
You can use this to find the hexadecimal unicode value of a character:
myString.charCodeAt(myIndex).toString(16)

Copy link to clipboard
Copied
It's the "Anchored object marker" (InDesign name) or "Object replacement character" (Unicode name) . 65532 in hexadecimal is FFFC, so in java/javascript unicode notation it is "\uFFFC".
myString = myString.replace(/\uFFFC/,"");
You can use this to find the hexadecimal unicode value of a character:
myString.charCodeAt(myIndex).toString(16)
Copy link to clipboard
Copied
Awesome, Haakenlid, thank you so much! The snippet worked like a charm.
And I really appreciate having a method for discovering the hex for unicode of any character.
Thanks again.
Copy link to clipboard
Copied
... I really appreciate having a method for discovering the hex for unicode of any character.
If the character is somewhere in your text, all you have to do is select just this character and look in the Info panel.

Copy link to clipboard
Copied
[Jongware] wrote:
... I really appreciate having a method for discovering the hex for unicode of any character.If the character is somewhere in your text, all you have to do is select just this character and look in the Info panel.
That's a good tip. Turns out that "Right Indent Tab" has Unicode value 8, which outside of InDesign is supposed to be "Backspace". There are a few of those tricky special characters in InDesign.
Copy link to clipboard
Copied
Help me please
Copy link to clipboard
Copied
Copy link to clipboard
Copied
what is my error in passwords
Copy link to clipboard
Copied
This is a user-to-user help forum. For anything to do with your Adobe licensing, subscription or account you need to contact Adobe technical support in your country or region.

