• Post Reply Bookmark Topic Watch Topic
  • New Topic

getBytes("8859_1"), "UTF-8")

 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have set my jsp's page encoding to utf-8.


this is the code I m using.

String strAdd=request.getParameter("address");
strAdd= new String(pValue.getBytes("8859_1"), "UTF-8");

This String "strAdd" fine, when I enter data from keyboard or copy it from notepad/editplus.

String "strAdd" has junk charecters "???" when I copy it from msword.

For Example - Neeraj's "test" is converted to Neearj?s ?test? when copied from ms word.


can anybody help ?

Thanks
Neeraj.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!