• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using UTF-8 encoding for jsp textarea field instead HTML encoding

 
N Naresh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i want use UTF-8 encoding for my jsp's text area field instead of HTML encoding.
I want to know how to set explicit encoding for a text area content in jsp file.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm pretty sure encoding can only be set for the entire page--but I could be wrong.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. The purpose of the encodings is completely different. UTF-8 is the encoding of the character set -- HTML encoding is to prevent confusion between special markup characters.
 
N Naresh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know how to set different encoding types in jsp
 
N Naresh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please suggest me how to do encoding in jsp
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
N Naresh wrote:Please suggest me how to do encoding in jsp

Not enough details to answer. Please use complete sentences and tell the details of what you are asking.
 
N Naresh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know how we can encode and decode different characters in jsp.
In my jsp file spaces are getting replaced with  characters, i need to avoid that characters to be replaced for spaces.
I need some help on encoding and decoding different characters in jsp file.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that has nothing to do with a textarea or HTML-encoding.

I'd show how you are specifying the encoding in the pages so someone familiar with character set encoding issues can hekp you, and I'd change the topic title to exclude the textarea mention, which is just a red herring.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic