Thanks!!!

On Fri, Oct 21, 2016 at 11:20 AM, Keisuke Miyako <[email protected]>
wrote:

> there is no native function, but you could try this:
>
> C_TEXT:C284($1;$0;$escaped)
>
> C_LONGINT:C283($i)
> C_BOOLEAN:C305($shouldEscape)
> C_BLOB:C604($data)
>
> For ($i;1;Length:C16($1))
>
>         $char:=Substring:C12($1;$i;1)
>         $code:=Character code:C91($char)
>
>         $shouldEscape:=False:C215
>
>         Case of
>                 : ($code=45)
>                 : ($code=46)
>                 : ($code>47) & ($code<58)
>                 : ($code>63) & ($code<91)
>                 : ($code=95)
>                 : ($code>96) & ($code<123)
>                 : ($code=126)
>                 Else
>                         $shouldEscape:=True:C214
>         End case
>
>         If ($shouldEscape)
>                 CONVERT FROM TEXT:C1011($char;"utf-8";$data)
>                 For ($j;0;BLOB size:C605($data)-1)
>                         $hex:=String:C10($data{$j};"&x")
>                         $escaped:=$escaped+"%"+
> Substring:C12($hex;Length:C16($hex)-1)
>                 End for
>         Else
>                 $escaped:=$escaped+$char
>         End if
>
> End for
>
> $0:=$escaped
>
> > 2016/10/21 8:49、Sujit Shah <[email protected]> のメール:
> > Is there a new 4D Command that does this?
> > I am using a large case statement to do this but does not work 100%
>
>
>
> 宮古 啓介
> セールス・エンジニア
>
> 株式会社フォーディー・ジャパン
> 〒150-0043
> 東京都渋谷区道玄坂1-10-2 渋谷THビル6F
> Tel: 03-6427-8441
> Fax: 03-6427-8449
>
> [email protected]
> www.4D.com/JP
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************




-- 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"There must be ingenuity as well as intention, strategy as well as
strength. "
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to