2 Replies - 9756 Views - Last Post: 09 October 2005 - 07:26 PM Rate Topic: -----

#1 lilygrace  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 103
  • Joined: 17-August 05

JSP: replacing ' (apostrophe)

Posted 07 October 2005 - 03:48 AM

we have encountering a problem here. we are trying to convert all apostrophe (entries pulled out from sql server dbase). We paste this passage in our sample blog script (this passage came from a website) and this what happened

Girls are like angels, they easily forgive and forget, while men are like devils, they easily get and forget. To love is to have courage to walk away and let got he other one who wishes to be free, no matter how much it hurts. Never say I ?I LOVE YOU? when you don?t even care. Never talk about the feeling if they are not there. Never touch a heart if you mean to break it. Never look into the eyes if all you have to say is lie. Never say hello if you lean goodbye.

those apostrophe supposedly (those were in "?" in the passage) did not convert but we do have this

String tempEntry = rsEntries.getString(4).replaceAll("▓","'");


and then we tried to manual type the apostrophe in our form and our code works...

what could be the problem?

This post has been edited by lilygrace: 07 October 2005 - 03:52 AM


Is This A Good Question/Topic? 0
  • +

Replies To: JSP: replacing ' (apostrophe)

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: JSP: replacing ' (apostrophe)

Posted 07 October 2005 - 05:24 AM

Hmm...odd...try breaking it down to see if the operation will run on a fully qualified string object
String tempEntry = rsEntries.getString(4);
tempEntry = tempEntry.replaceAll("?","'");


Let me know how it turns out...it may be an escape character problem as well.
Was This Post Helpful? 0
  • +
  • -

#3 lilygrace  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 103
  • Joined: 17-August 05

Re: JSP: replacing ' (apostrophe)

Posted 09 October 2005 - 07:26 PM

no luck amadeus :(
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1