Article View: adobe.scripting.indesign
Article #15563Re: Unicode character in a comparison (2.0.2 AS)
From: Dave_Saunders
Date: Fri, 21 Nov 2003 13:25
Date: Fri, 21 Nov 2003 13:25
23 lines
1264 bytes
1264 bytes
If it's any consolation, those other languages don't help with meaning either. You have to do this kind of thing:
function decypherUnits (theNum)
{
if (theNum<257)
{
// Custom settings are in points.
return "pts";
}
// Decyphers for print purposes, so inches and inches decimal are both returned as 'ins'
theNums = [2054187363,2054188905,2053729891,2053729892,2053991795,2053336435,2053335395]
theMeanings = ["picas","pts","ins","ins","mms","cms","ciceros"]
for (var i = 0; i<theNums.length; i++)
{
if (theNum == theNums[i])
{
return theMeanings[i];
}
}
return theNum
}
Dave
Technical Details
Message-ID:
<2cce67ca.12@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cce67ca.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,99b09d14135470c X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-21 05:37:46 PST From: Dave_Saunders@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Unicode character in a comparison (2.0.2 AS) Message-ID: <2cce67ca.12@webx.la2eafNXanI> Date: Fri, 21 Nov 2003 05:25:02 -0800 References: <2cce67ca.-1@webx.la2eafNXanI> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit