• Post Reply Bookmark Topic Watch Topic
  • New Topic

textarea - Dash  RSS feed

 
Abhijith Prabhakar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am displaying a String which conatains a "dash" inside a textArea. But when page is rendered, it turns into question mark. Can anyone please tell me how can I fix this?

"this is � the one"
 
Abhijith Prabhakar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just found out that its "emdash" or "endash" which creates problem. Also found that StringEscapeUtils.escapeHtml() of commons lang escapses these charecters.

Problem now is I am using this escape inside a text area in JSP. Instead of display "-", text area display "–". Any suggestions on this?

<input:textarea name="<%= name %>" rows=5 cols=100><%= StringEscapeUtils.escapeHtml((String) value) %></input:textarea>

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