Skip to main content
Participant
December 1, 2012
Question

content contains characters which can not be encoded

  • December 1, 2012
  • 2 replies
  • 2648 views

When i use SpecialCharacters.RIGHT_INDENT_TAB i am getting above mentioned runtime error.

This topic has been closed for replies.

2 replies

Vamitul
Legend
December 3, 2012

you cannot encode a right indent tab in XML because there is no such char in unicode. the same for a "indent to here".\

one fix i use is to use a marker (##RI#-for rightIndent tab) and convert them at the end using a find-replace.

if anyone has a better solution PLEASE PLEASE PLEASE tell.

Trevor:
Legend
December 4, 2012

Vamitul

Isn't \u0008 the Unicode for end of line tabs?

app.activeDocument.stories[0].insertionPoints[-2].contents="\u0008" does the trick.  Although I saw something about 0008 being backspace.

Let me know if this works if it does I'll try look into indent to here

Trevor

Jongware
Community Expert
Community Expert
December 4, 2012

Trevor, \u0008 is the Unicode for Backspace. InDesign uses the code to do something else -- just like a couple of other codes, such as \u0018, the Current Page Number placeholder.

csm_phil
Legend
December 1, 2012

Hi Umesh,

Please try the simple JS code for insert the "Right Indent Tab" Character.

app.selection[0].insertionPoints[0].contents = SpecialCharacters.RIGHT_INDENT_TAB;

thx,

csm_phil

Umesh06Author
Participant
December 1, 2012

I tried it but not working

i want right indent tab before node so gave tab like

Nd.contents = SpecialCharacters.RIGHT_INDENT_TAB

Jongware
Community Expert
Community Expert
December 1, 2012

"node" -- that really, really makes it sound as if this is part of an XML-based workflow.

Any details you might want to add to your one line problem description and question?