<%@language = "javascript" %>
<% /*
     $Revision$
     $Id$

    File:           shared/charset_test.asp
    Description:    Laat zien wat het effect is van diverse (url) escape functies
    Context:        Internal only
    Note:
*/ %>
<%
    var ANONYMOUS_Allowed = 1;
%>
<!-- #include file="../Shared/common.inc" -->
<html>
  <head>
    <% FCLTHeader.Generate({}); %>
  </head>
  <body>
<%
user.auth_required_or_abort(Application("otap_environment") == "O");

// Let op: door common.inc gezet:
//      Response.Codepage = 1252;
//      Response.Charset = 'windows-1252';

var str = "Test spatie euro € e-accent é ampersand & plus +";

var param = getQParam("param", "");

function testone(str)
{
    Response.Write("<br>Response.Codepage = " + Response.Codepage);
    Response.Write("<br>Response.Charset = " + Response.Charset);
    Response.Write("<table>");
    Response.Write("<tr><th>Methode</th><th>Resultaat</th></tr>");
    Response.Write("<tr><td>Response.Write</td><td>" + str + "</td></tr>");
    Response.Write("<tr><td>Javascript escape</td><td>" + escape(str) + "</td></tr>");
    Response.Write("<tr><td>Server.URLencode</td><td>" + Server.URLencode(str) + "</td></tr>");
    Response.Write("<tr><td>encodeURIComponent</td><td>" + encodeURIComponent(str) + "</td></tr>");
    Response.Write("</table>");
}
testone(str);

if (param)
{
    testone(param);
    testone(decodeURIComponent(param));
}

//Response.Codepage = 65001;
//Response.Charset = 'utf-8';
//testone();

%>
  </body>
</html>
<% ASPPAGE_END(); %>
