RE: Special Characters driving me nuts
common PITA... I usually do a Replace(stringname, '', quot;) and a Replace(string, ', rsquo) assuming the and ' are stored in the DB as and ' respectively. Note for dumping data like this into JavaScript, escape them. Doug -Original Message- From: Joshua Miller [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:27 PM To: CF-Talk Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now, I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table, so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net http://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254 *** * * Any views expressed in this message are those of the individual sender, except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] *** * * ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Special Characters driving me nuts
Don't use URLEncodedFormat() when inserting the data. Place it into the database as-is. Use HTMLEditFormat() to display the data. You'll have to update rows that you URLEncodedFormat() back to their original format. - Original Message - From: Joshua Miller [EMAIL PROTECTED] Date: Monday, March 10, 2003 12:26 pm Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now,I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] ') mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table,so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net target=lhttp://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254 * Any views expressed in this message are those of the individual sender,except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to ') mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] * ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Special Characters driving me nuts
I HAVE to use URLEncodedFormat to store the data. Unfortunately what I have to do is allow a preview of the user's submission, but there are around 50 fields I have to store that typically go into about 6 different tables, so I'm storing everything as a name=value;name=value; string in a table, displaying the preview and then cleaning out the preview table upon submission. So, I'm creating dynamic variables before the insert and I have to use URLEncodedFormat so that the users can enter the characters I use as delimiters. Basically, I use name=value;name=value; so if the user enters an = or ; character it breaks my string. This is how I'm doing it right now: 1. URLEncodedFormat() the data into the database 2. Grab that string from the database on the preview page 3. Loop over the string and cut into name/value pairs for another list loop 4. On the second list loop URLDecode the value so it's correct as it was entered by the user 5. Display using HTMLEditFormat() on the document This should work just fine and be exactly like storing the data as-is in the database. The problem is if the value of a variable on the preview page begins with a special character it won't display. Everything else around it displays fine and even if there are quotes in the middle they work, it's just the first character. If the first character is a special character it won't display that entire value. Any other ideas? Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 * Any views expressed in this message are those of the individual sender, except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to [EMAIL PROTECTED] * -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:41 PM To: CF-Talk Subject: Re: Special Characters driving me nuts Don't use URLEncodedFormat() when inserting the data. Place it into the database as-is. Use HTMLEditFormat() to display the data. You'll have to update rows that you URLEncodedFormat() back to their original format. - Original Message - From: Joshua Miller [EMAIL PROTECTED] Date: Monday, March 10, 2003 12:26 pm Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now,I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] ') mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table,so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net target=lhttp://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254 ** ** * Any views expressed in this message are those of the individual sender,except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to ') mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] * ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm
Re: Special Characters driving me nuts
Joshua, All will be well if you send your form data directly to the DB in a CFQUERYPARAM tag ***without applying any functions***. That's especially important if you're using MX because there's an apostrophe bug that only occurs when Trim() is applied to parameter values inserted into or updating the DB. (Although I'm not convinced that the use of Trim() is even necessary for that.) You can then apply the HTMLEditFormat and Trim functions to display the data correctly. ~Dina - Original Message - From: Joshua Miller [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:26 PM Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now, I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table, so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net http://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254 * Any views expressed in this message are those of the individual sender, except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] * ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: RE: Special Characters driving me nuts
In your preview table, how about having two columns, one for name, another for value. That way, you can easily just urlEncode() each of those two columns for the link, while you can still directly output the equals and semicolons/ - Original Message - From: Joshua Miller [EMAIL PROTECTED] Date: Monday, March 10, 2003 2:52 pm Subject: RE: Special Characters driving me nuts I HAVE to use URLEncodedFormat to store the data. Unfortunately what I have to do is allow a preview of the user's submission, but there are around 50 fields I have to store that typically go into about 6 different tables, so I'm storing everything as a name=value;name=value;string in a table, displaying the preview and then cleaning out the preview table upon submission. So, I'm creating dynamic variables beforethe insert and I have to use URLEncodedFormat so that the users can enter the characters I use as delimiters. Basically, I use name=value;name=value; so if the user enters an = or ; character it breaks my string. This is how I'm doing it right now: 1. URLEncodedFormat() the data into the database 2. Grab that string from the database on the preview page 3. Loop over the string and cut into name/value pairs for another list loop 4. On the second list loop URLDecode the value so it's correct as it was entered by the user 5. Display using HTMLEditFormat() on the document This should work just fine and be exactly like storing the data as- is in the database. The problem is if the value of a variable on the preview page begins with a special character it won't display. Everything else around it displays fine and even if there are quotes in the middle theywork, it's just the first character. If the first character is a special character it won't display that entire value. Any other ideas? Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 * Any views expressed in this message are those of the individual sender,except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to [EMAIL PROTECTED] * -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:41 PM To: CF-Talk Subject: Re: Special Characters driving me nuts Don't use URLEncodedFormat() when inserting the data. Place it into the database as-is. Use HTMLEditFormat() to display the data. You'll have to update rows that you URLEncodedFormat() back to their original format. - Original Message - From: Joshua Miller [EMAIL PROTECTED] Date: Monday, March 10, 2003 12:26 pm Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now,I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] ') ') mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table,so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net target=l target=lhttp://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254 ** ** * Any views expressed in this message are those of the individual sender,except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you
Re: Special Characters driving me nuts
Oops...didn't see this before I posted. ~Dina - Original Message - From: Joshua Miller [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, March 10, 2003 3:52 PM Subject: RE: Special Characters driving me nuts I HAVE to use URLEncodedFormat to store the data. Unfortunately what I have to do is allow a preview of the user's submission, but there are around 50 fields I have to store that typically go into about 6 different tables, so I'm storing everything as a name=value;name=value; string in a table, displaying the preview and then cleaning out the preview table upon submission. So, I'm creating dynamic variables before the insert and I have to use URLEncodedFormat so that the users can enter the characters I use as delimiters. Basically, I use name=value;name=value; so if the user enters an = or ; character it breaks my string. This is how I'm doing it right now: 1. URLEncodedFormat() the data into the database 2. Grab that string from the database on the preview page 3. Loop over the string and cut into name/value pairs for another list loop 4. On the second list loop URLDecode the value so it's correct as it was entered by the user 5. Display using HTMLEditFormat() on the document This should work just fine and be exactly like storing the data as-is in the database. The problem is if the value of a variable on the preview page begins with a special character it won't display. Everything else around it displays fine and even if there are quotes in the middle they work, it's just the first character. If the first character is a special character it won't display that entire value. Any other ideas? Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 * Any views expressed in this message are those of the individual sender, except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to [EMAIL PROTECTED] * -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:41 PM To: CF-Talk Subject: Re: Special Characters driving me nuts Don't use URLEncodedFormat() when inserting the data. Place it into the database as-is. Use HTMLEditFormat() to display the data. You'll have to update rows that you URLEncodedFormat() back to their original format. - Original Message - From: Joshua Miller [EMAIL PROTECTED] Date: Monday, March 10, 2003 12:26 pm Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now,I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] ') mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table,so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net target=lhttp://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254 ** ** * Any views expressed in this message are those of the individual sender,except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete
RE: Special Characters driving me nuts
are you using method=GET in your form post If not, I see no reason to use URLEncodedformat. Use cfqueryparam to ensure data is escaped as needed on the way into your DB. When you display it, then use HTMLEditFormat or my previous suggestions on replace...blah...blah... the URLencode/decode are for passing data via URL. Are you doing this? Doug -Original Message- From: Joshua Miller [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 4:53 PM To: CF-Talk Subject: RE: Special Characters driving me nuts I HAVE to use URLEncodedFormat to store the data. Unfortunately what I have to do is allow a preview of the user's submission, but there are around 50 fields I have to store that typically go into about 6 different tables, so I'm storing everything as a name=value;name=value; string in a table, displaying the preview and then cleaning out the preview table upon submission. So, I'm creating dynamic variables before the insert and I have to use URLEncodedFormat so that the users can enter the characters I use as delimiters. Basically, I use name=value;name=value; so if the user enters an = or ; character it breaks my string. This is how I'm doing it right now: 1. URLEncodedFormat() the data into the database 2. Grab that string from the database on the preview page 3. Loop over the string and cut into name/value pairs for another list loop 4. On the second list loop URLDecode the value so it's correct as it was entered by the user 5. Display using HTMLEditFormat() on the document This should work just fine and be exactly like storing the data as-is in the database. The problem is if the value of a variable on the preview page begins with a special character it won't display. Everything else around it displays fine and even if there are quotes in the middle they work, it's just the first character. If the first character is a special character it won't display that entire value. Any other ideas? Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 *** * * Any views expressed in this message are those of the individual sender, except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to [EMAIL PROTECTED] *** * * -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:41 PM To: CF-Talk Subject: Re: Special Characters driving me nuts Don't use URLEncodedFormat() when inserting the data. Place it into the database as-is. Use HTMLEditFormat() to display the data. You'll have to update rows that you URLEncodedFormat() back to their original format. - Original Message - From: Joshua Miller [EMAIL PROTECTED] Date: Monday, March 10, 2003 12:26 pm Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now,I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] ') mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table,so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net target=lhttp://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254 ** ** * Any views expressed in this message are those of the individual sender,except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private
RE: Special Characters driving me nuts
Another suggestion would be to manually set the encoding on the specific protocol (replacing the charset w/ whatever charset you need): cfset setEncoding(URL,iso-8859-1) or cfset setEncoding(FORM,iso-8859-1) Hope this helps. - James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 5:47 PM To: CF-Talk are you using method=GET in your form post If not, I see no reason to use URLEncodedformat. Use cfqueryparam to ensure data is escaped as needed on the way into your DB. When you display it, then use HTMLEditFormat or my previous suggestions on replace...blah...blah... the URLencode/decode are for passing data via URL. Are you doing this? Doug -Original Message- From: Joshua Miller [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 4:53 PM To: CF-Talk Subject: RE: Special Characters driving me nuts I HAVE to use URLEncodedFormat to store the data. Unfortunately what I have to do is allow a preview of the user's submission, but there are around 50 fields I have to store that typically go into about 6 different tables, so I'm storing everything as a name=value;name=value; string in a table, displaying the preview and then cleaning out the preview table upon submission. So, I'm creating dynamic variables before the insert and I have to use URLEncodedFormat so that the users can enter the characters I use as delimiters. Basically, I use name=value;name=value; so if the user enters an = or ; character it breaks my string. This is how I'm doing it right now: 1. URLEncodedFormat() the data into the database 2. Grab that string from the database on the preview page 3. Loop over the string and cut into name/value pairs for another list loop 4. On the second list loop URLDecode the value so it's correct as it was entered by the user 5. Display using HTMLEditFormat() on the document This should work just fine and be exactly like storing the data as-is in the database. The problem is if the value of a variable on the preview page begins with a special character it won't display. Everything else around it displays fine and even if there are quotes in the middle they work, it's just the first character. If the first character is a special character it won't display that entire value. Any other ideas? Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 *** * * Any views expressed in this message are those of the individual sender, except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to [EMAIL PROTECTED] *** * * -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:41 PM To: CF-Talk Subject: Re: Special Characters driving me nuts Don't use URLEncodedFormat() when inserting the data. Place it into the database as-is. Use HTMLEditFormat() to display the data. You'll have to update rows that you URLEncodedFormat() back to their original format. - Original Message - From: Joshua Miller [EMAIL PROTECTED] Date: Monday, March 10, 2003 12:26 pm Subject: Special Characters driving me nuts Greetings, I've been fighting with user-input and special characters for days now,I'm starting to get really frustrated. Here's the scenario: 1. User enters data into a textarea field. This will usually contain several special characters (?/{}[]|\[EMAIL PROTECTED] ') mailto:[EMAIL PROTECTED]*, *,?/{}[]|\-_+)(^) 2. I use URLEncodedFormat before sticking the data in my database table,so I'm storing encoded data 3. I use URLDecode when retrieving the data into an HTML page to show the data entered. Here's the problem: Data that begins with a special character doesn't display. Data that is surrounded by marks doesn't display For example: This line won't display in HTML This line $ will display in HTML This line will not display in HTML $This line will not display in HTML If I use HTMLEditFormat() I still can't see the items surrounded by marks and it also displays the URLEncodedFormat information so space = %20 on screen in the HTML page. How do I overcome this issue? Thanks, Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net target=lhttp://www.garrisonenterprises.net/ [EMAIL PROTECTED] (704) 569-9044 ext. 254