This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Special characters in the database field Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Special characters in the database field" Watch "Special characters in the database field" New topic
Author

Special characters in the database field

Sangeetha Verkot
Greenhorn

Joined: Jun 07, 2007
Posts: 4
Hi,
I hope this is the right place to ask this question. I have SQL server (2000) database table that has encoded email messages. I want to decode this message and present it in plain English. But the problem is the database puts a special character in the end of each line that looks like a bold line. Does anyone know what this character is called and maybe how to replace it with ""? This is messing up my decoding method.

Thanks!
Chad Clites
Ranch Hand

Joined: Aug 16, 2005
Posts: 134
I can think of a couple of approaches. Assuming that the message is just a string of some sort, it should be a matter (maybe) of figuring out what the symbol is and replacing all instances in a string. If you can capture the symbol using cut and paste or something, then it can be replaced in the string easily by using:
mystring.replace(character_to_replace,"");
That would be about the easiest approach I can think of.
Sangeetha Verkot
Greenhorn

Joined: Jun 07, 2007
Posts: 4
Thanks. I'll try to figure out a way to remove all the special characters from the body of the message.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2343

Sangeetha,

It might be an end-of-line character.
Wikipedia has a Newline entry.
Regards, Jan
[ June 14, 2007: Message edited by: Jan Cumps ]

OCUP UML fundamental
ITIL foundation
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Special characters in the database field
 
Similar Threads
Need help programming regular expressions
never seen it before
Special characer in Database + problem in trimming it with trim()
Special Characters in JSP Page
Special character handling