🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15448

Entering unicode (JS)

#15448
From: Peter_Kahrel
Date: Sat, 29 Nov 2003 13:00
19 lines
1121 bytes
How do you enter characters using unicode notation and using a variable? To insert a unicode value you'd use something like this:

app.selection[0].contents="\u0254"

to insert unicode character 0254. But the following does not work:

var a="0254";
app.selection[0].contents="\u"+a

This enters u0254 in the document. And with

var a="0254";
app.selection[0].contents="\\u"+a

\u0254 is entered.

Can't get this to work. Any ideas? Thanks.

Peter
Technical Details
Message-ID: <2ccea61e.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,cc26865e5febf839,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-11-29 05:07:29 PST
From: Peter_Kahrel@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Entering unicode (JS)
Message-ID: <2ccea61e.-1@webx.la2eafNXanI>
Date: Sat, 29 Nov 2003 05:00:03 -0800
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit