aspose file tools*
The moose likes JSP and the fly likes Using UTF-8 encoding for jsp textarea field instead HTML encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Using UTF-8 encoding for jsp textarea field instead HTML encoding" Watch "Using UTF-8 encoding for jsp textarea field instead HTML encoding" New topic
Author

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

N Naresh
Ranch Hand

Joined: Nov 04, 2008
Posts: 66
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

Joined: Sep 29, 2008
Posts: 12617

I'm pretty sure encoding can only be set for the entire page--but I could be wrong.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
N Naresh
Ranch Hand

Joined: Nov 04, 2008
Posts: 66
I want to know how to set different encoding types in jsp
N Naresh
Ranch Hand

Joined: Nov 04, 2008
Posts: 66
Please suggest me how to do encoding in jsp
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

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

Joined: Nov 04, 2008
Posts: 66
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

Joined: Jan 10, 2002
Posts: 61199
    
  66

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using UTF-8 encoding for jsp textarea field instead HTML encoding