• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

get a greek string through an html form

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 129
Firefox Browser Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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'.
 
Greenhorn
Posts: 6
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Tamas, that was what I needed!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic