Hello

I created a plugin to convert utf 8 to mac and mac to utf 8. (only for os x)

After a lot's of tests, I think there is a mistake in Active4d.
When sending Ajax-Request with prototype it sends the data escaped. You can see this, when install HttpFox to Firefox.

But now I have problems with the ü (ü)
it is send from the browser as %C3BC which is correct.
But Active 4d convert this Post-Variable automatic and after this the "ü" is not converted correct.
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.

you can try out:
http://www.mountain.ch/test/ajaxtest.gos?test=%C3%A4%C3%B6%C3%BC

or try this.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Test Encode Decode</title>
</head>
<body>
<%
$cTest:=new collection

$cTest{"step01 textEscape"}:="%C3%A4%C3%B6%C3%BC"
$cTest{"step02 textDecode"}:=url decode($cTest{"step01 textEscape"})
$cTest{"step03 textEncode"}:=url encode($cTest{"step02 textDecode"})
$cTest{"step04 textDecodeIso2Mac"}:=iso to mac($cTest{"step02 textDecode"}) $cTest{"step05 textDecodeMac2Iso"}:=mac to iso($cTest{"step04 textDecodeIso2Mac"}) $cTest{"step06 textEncode"}:=url encode($cTest{"step05 textDecodeMac2Iso"})
%>
<h3>Convert Steps</h3>
<%a4d.debug.dump collection($cTest)%>
<h3>Query</h3>
<p>Click the Link: <a href="?test=%C3%A4%C3%B6%C3%BC">test=%C3%A4%C3% B6%C3%BC</a> means "test=&auml;&ouml;&uuml;"</p>
<p>Active4d get's %C3%A4%C3%B6%C3%BC</p>
<p>and convert it to </p>

<%a4d.debug.dump collection(_query)%>

<p>When escape this again then you can see the mistake</p>
<%writebr(url encode(mac to win(_query{"test"})))%>
correct is:<br />
%C3%A4%C3%B6%C3%BC
</body>
</html>

Regards, Oliver_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to