I
inder1978
Hi group..
I have an HTML form which is made dynamically using XSL transformation.
The charset is "supposed" to be UTF-8 to accommodate Turkish
characters.
We are able to display all the non-ISO special characters correctly
when we load the page initially. But for some reasons, when a user
"POSTS" the data, all the special characters are transformed into
gibberish(two junk characters per each special character).
I believe I am setting the page header correctly(please see the meta
tag in the code posted below), but for some reasons its not effective.
When I click auto-select in IE, UTF-8 is changed to Windows-Western
Europe.
Strangely enough, when form method is changed into "GET", it works..But
'coz of security reason, we cannot use GET..
I would appreciate any insight into this problem...Relevant parts of
the code is posted below...Thanks, Inder
1) XSL before transformation
############code begin#############
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import
href="/WEB-INF/xsl/html4/includes/forms/updateUserInformationForm.xsl"/>
<xslutput indent="yes" method="html" omit-xml-declaration="yes"/>
<xsl:template match="/">
<html xmlns:fo="http://www.w3.org/1999/XSL/Format">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<title></title>
<LINK REL="stylesheet" TYPE="text/css"
HREF="scripts/css/c2p_style.css"/>
<script src="scripts/dhtml.js" type="text/javascript"/>
<script language="JavaScript">
############skipped############
</script>
</head>
<body onload="onLoad()" class="Payment">
<form method="POST" id="{$userInformationForm}"
name="{$userInformationForm}">
###########skipped#############
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
##############################################################
2) Generated HTML as seen by the browser
<html xmlns:fo="http://www.w3.org/1999/XSL/Format">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
<LINK HREF="scripts/css/c2p_style.css" TYPE="text/css"
REL="stylesheet">
<script type="text/javascript" src="scripts/dhtml.js"></script>
<script language="JavaScript">
#########skipped###########
</script>
</head>
<body class="Payment" onload="onLoad()">
<form name="userInformationForm" id="userInformationForm" method="GET"
action="/myapplication/userInformationSubmit.do;jsessionid=60204846777C6483DBC77A8C39C98196">
#########skipped############
</form>
</body>
</html>
I have an HTML form which is made dynamically using XSL transformation.
The charset is "supposed" to be UTF-8 to accommodate Turkish
characters.
We are able to display all the non-ISO special characters correctly
when we load the page initially. But for some reasons, when a user
"POSTS" the data, all the special characters are transformed into
gibberish(two junk characters per each special character).
I believe I am setting the page header correctly(please see the meta
tag in the code posted below), but for some reasons its not effective.
When I click auto-select in IE, UTF-8 is changed to Windows-Western
Europe.
Strangely enough, when form method is changed into "GET", it works..But
'coz of security reason, we cannot use GET..
I would appreciate any insight into this problem...Relevant parts of
the code is posted below...Thanks, Inder
1) XSL before transformation
############code begin#############
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import
href="/WEB-INF/xsl/html4/includes/forms/updateUserInformationForm.xsl"/>
<xslutput indent="yes" method="html" omit-xml-declaration="yes"/>
<xsl:template match="/">
<html xmlns:fo="http://www.w3.org/1999/XSL/Format">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<title></title>
<LINK REL="stylesheet" TYPE="text/css"
HREF="scripts/css/c2p_style.css"/>
<script src="scripts/dhtml.js" type="text/javascript"/>
<script language="JavaScript">
############skipped############
</script>
</head>
<body onload="onLoad()" class="Payment">
<form method="POST" id="{$userInformationForm}"
name="{$userInformationForm}">
###########skipped#############
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
##############################################################
2) Generated HTML as seen by the browser
<html xmlns:fo="http://www.w3.org/1999/XSL/Format">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
<LINK HREF="scripts/css/c2p_style.css" TYPE="text/css"
REL="stylesheet">
<script type="text/javascript" src="scripts/dhtml.js"></script>
<script language="JavaScript">
#########skipped###########
</script>
</head>
<body class="Payment" onload="onLoad()">
<form name="userInformationForm" id="userInformationForm" method="GET"
action="/myapplication/userInformationSubmit.do;jsessionid=60204846777C6483DBC77A8C39C98196">
#########skipped############
</form>
</body>
</html>