[opencms-dev] Unicode in OpenCMS
Phan Dang Dinh
phan_dang_dinh at yahoo.co.uk
Mon Aug 23 11:51:57 CEST 2004
Hi, List!
I have a jsp file in OpenCMS. But I do not know how to
get correct unicode value in my textbox. Pls help!
Here is my code:
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<title></title>
</head>
<%@ page pageEncoding="UTF-8" %>
<%@ page
import="java.util.*,com.opencms.flex.jsp.*,com.opencms.file.CmsObject,com.opencms.file.*,
com.opencms.core.CmsException" %>
<%@ page session="false" %>
<%@ page language="java" contentType="text/html;
charset=utf-8" pageEncoding="UTF-8"%>
<%
// request.setCharacterEncoding("utf-8");
request.setCharacterEncoding("UTF-8");
CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request, response);
//cms.getRequestContext().setCharacterEncoding("utf-8");
cms.getRequest().setCharacterEncoding("utf-8");
cms.getRequestContext().setEncoding("UTF-8",
false);
// String s = request.getParameter("testparam");
String s =
cms.getRequestContext().getRequest().getParameter("testparam");
out.println("???? ??? "+s);
%>
<body>
<h2>JSP Form with some greeks : ????</h2>
<form method="post" action"."
enctype="multipart/form-data"
CharacterEncoding="UTF-8">
<input type="text" name="testparam">
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</html>
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
More information about the opencms-dev
mailing list