Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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

 
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.
 
Author
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.
 
Marshal
Posts: 67163
169
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
Marshal
Posts: 67163
169
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
Marshal
Posts: 67163
169
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
Boost this thread!