• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Russian character in servlet

 
akki patel
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing problem in servlet when I getting the value of russian character using request parameter. I got the russian character but some character are missing.
Using this syntax,
String test = new String(stringname.getBytes() , "UTF-8");
I got the russian character but some character are misssing here.


anybody know about this pls. help me.

[ July 05, 2007: Message edited by: akki patel ]
[ July 05, 2007: Message edited by: akki patel ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

What kind of object is "txt"? If it's a string, then using toString is not necessary, and if it's not a String, then using toString may produce surprising results.

Assuming that it is a String, are you certain that "txt" is in UTF-8? I'm asking because that's what the code asserts about it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!