Article View: adobe.scripting.indesign
Article #88converting Arabic numbers from String format to Number format
From: Ola_Khrapatin
Date: Sun, 29 Mar 2009 12:57
Date: Sun, 29 Mar 2009 12:57
14 lines
1109 bytes
1109 bytes
Hi, I have the following code: var item = myFoundItems[i].contents; //this is some text in Arabic, followed by an Arabic number. But the type is String. eg. "Page 15" var pageNumber = item.slice(7); //the page number itself convPageNumber = Number(pageNumber); //change the string into a number Now, after the last line, the value of convPageNumber is NaN. I think the problem is that the Arabic number is somehow not recognized... What can I do? Thanks, Ola
Technical Details
Message-ID:
<59b8718b.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,e56a497d48c5d,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Ola_Khrapatin@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: converting Arabic numbers from String format to Number format Message-ID: <59b8718b.-1@webcrossing.la2eafNXanI> Date: Sun, 29 Mar 2009 05:57:20 -0700 Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Original-Lines: 16