« Return to Thread: Ajax issue with escaped characters

Ajax issue with escaped characters

by Robert Ernens :: Rate this Message:

Reply to Author | View in Thread

>
> In my test I simulate this converting-procedure.
> I don't know if it is a mistake in my brain, ore a mistake in Active4d.

The issue comes from 4D not from A4D.

This was already addressed in a previous post.

You need to convert UTF to mac prior to A4 handling the variables.
In order to do so you need to modify the On Web connection method as below

    ARRAY TEXT($varNames;0)
    ARRAY TEXT($varValues;0)
    GET WEB FORM VARIABLES($varNames;$varValues)
   
      `changes by Robert Ernens
    For ($j;1;Size of array($varValues))
        If ($varNames{$j}#"A4D_Upload")
            $varValues{$j}:=L2BO_WWW_UTF_decode ($varValues{$j};True)
        End if
    End for
   
    $status:=A4D Execute 4D request
($2;$varNames;$varValues;$requestInfo;A4D_ResponseHeaderNames;A4D_ResponseHe
aderValues;A4D_Response)

In fact 4D converts the variables received through AJAX or any other web
request prior to  passing them to A4D.

Send me a mail and I'll send you the 4D methods that I wrote for converting
from UTF to mac and the reverse. These methods are used in production for
monthes now.

Also, be carefull to exclude from the conversion any file upload variables
that you use (in my case always A4D_upload) or you file upload won't work
any longer.
   
--
Robert Ernens
Look2BookOnline® - Web-à-la-Carte®
HCTBA Consulting


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

 « Return to Thread: Ajax issue with escaped characters

LightInTheBox - Buy quality products at wholesale price!