Forums Register Login

Special Characters

+Pie Number of slices to send: Send
Is there a way aroud sepcial characters when inserting into a database instead of going through the string and replacing them with something else and also without using escape characters for each one because the string i am using is the title of an article file and is different for every file so i don't know where the special characters will be.
+Pie Number of slices to send: Send
Tex
Try using a prepared statement. Then you just insert the string into the SQL statement where you have defined your parameters. I know it works for things like single quotes and slashes.

Hope that helps
+Pie Number of slices to send: Send
Before sendind the data in to the database , you can escape the data with javascript escape function. while you are getting form the database just use unescape.
Ex:
<script language="javascript>
function onLoad()
{
doucment.frameName.title.value= unescape(<%= title %> ;
}
function go()
{
doucment.frameName.title.value = escape(doucment.frameName.title.value);
doucment.frameName.action="";
doucment.frameName.submit();
</script>
................
Use Go to send to next form...
use OnLoad while loading the page.
I think this will slove your problem.....
[ October 30, 2002: Message edited by: seetharam sarma ]
Hey! Wanna see my flashlight? It looks like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1019 times.
Similar Threads
Using special characters in java
Problem Whit Special Characters on server side
Using ServletOutputStream to write contents to a download file
Regex | Parse | Split?
Removing special characters from a String
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:04:41.