Article View: adobe.scripting.indesign
Article #18940Re: detect invisible markup characters
From: Teus de Jong
Date: Wed, 05 Feb 2003 15:03
Date: Wed, 05 Feb 2003 15:03
32 lines
1491 bytes
1491 bytes
Ole,
Sorry, I did not give the real function (and was too late to edit it). Here's the one I really use:
function GetUnicodeString(IndText: Olevariant; forexport: Boolean): string;
var ws: Widestring;
t: integer;
begin
Result:='';
try
IndText:=IndText.Textcontents;
except on EOleSysError do
exit;
end;
if Vartype(IndText)<>varOlestr then
// get Ind special character; not included here
ws:=getspecial(IndText)
else ws:=IndText;
if Length(ws)=0 then exit;
for t:=1 to Length(ws) do
Result:=Result+Format('<%s>', [IntToHex(integer(ws[t]), 4)]);
if forexport then
Result:=StringReplace(Result, '<', '<0x', [rfReplaceAll]);
end;
Teus de Jong
Technical Details
Message-ID:
<1de78e06.3@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de78e06.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,fc058cbf7f57ecfa X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-05 07:09:44 PST From: "Teus de Jong" <teus@teusdejong.nl> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: detect invisible markup characters Message-ID: <1de78e06.3@WebX.la2eafNXanI> Date: Wed, 5 Feb 2003 07:03:05 -0800 References: <1de78e06.-1@WebX.la2eafNXanI> Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit