We help IT Professionals succeed at work.

Problem with the Grrek Lang. in JSP forms!!!

massrico
massrico asked
on
Medium Priority
315 Views
Last Modified: 2010-04-01
Hi All

I work with site that deals with greek language and i faces this problem

The JSP page is working 100% with the greek lang. (UTF-8) but when my form sends greek statements to another page through TextBox, strange characters appers like that "Καλωσηρθατε" while the original statement is "Καλωσηρθατε".

I get the statement with <%=request.getParameter("test")%>

Thanx for help
Comment
Watch Question

Commented:
Hi,

the following is needed,

in the jsp page, do keep at the start of the page the following directive
<%@ page pageEncoding="UTF-8" %>
<%@ page language="java" contentType="text/html;charset=UTF-8" %>

OR
if you are getting the values in servlet, then try the following

if(request.getCharacterEncoding() == null){
   request.setCharacterEncoding("UTF-8");
}

String test = request.getParameter("test");

hope it helps.
fargo

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Hi Frago

Thanx for help i think that i missed these statements
if(request.getCharacterEncoding() == null){
   request.setCharacterEncoding("UTF-8");
}

it's now solved

thanks
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.