• Post Reply Bookmark Topic Watch Topic
  • New Topic

get a greek string through an html form  RSS feed

 
stelios andreadis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! I have an html page, which contains the following form:

<form action="adduser.jsp" method="post">
Username <input type="text" name="user" />
Password <input type="password" name="psw" />
<input type="submit" value="Register" />

Then in the adduser.jsp page I get the name with the command:
String name = request.getParameter( "user" );

The problem is when I give greek names. For example, if I insert the name "νίκος" the result in the jsp page is "???".
I tried adding " accept-charset="iso-8859-7" ", which is recommended for greek, but nothing happened. Any ideas?
 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi stelios

which charset you are using in your meta tag of your jsp ??


is it WINDOWS-1253 or ISO-8859-1... I think it is ISO-8859-1 so convert it to WINDOWS-1253 ..

try to convert it using the below code



try and see whether is it working or not ? check this link also LINK

Regards
VIJINDAS


 
stelios andreadis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply, but it didn't help. The characters change, but the result is other strange characters!
The charset in my meta tag is 'utf-8'.
 
Tamas Ragoncsa
Greenhorn
Posts: 6
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stelios,

I believe

will do the trick for you.

Tamas
 
stelios andreadis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Tamas, that was what I needed!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!