I'm trying to catch some characters in a string before they are entered into a database that are not ASCII and convert them to ASCII characters. The characters in question are the angular double quotes but this could be associated with similar occurences. I want to check for left angular double quotes [“] or right angular double quotes [“] and replace them with straight double quotes ["].
(I'm not actually storing the HTML equivalents - they are simply there to give you an idea of which characters I'm on about.)a way of catching these buggers? I've tried using chr(8220) (the numeric code for one of the illegal characters apparently) but ASP has a problem working with numbers outside the character map.
I am doing a reskin of an ASP site, MS SQL in the back end. I made a copy of the site and DB and am using them as my development site. Fine so far, but here's where it gets wierd. I am getting random ASCII characters throughout my text, not totaly random, for example a double quote will come back as ’. So they're consistant. This is both for data in a file, and data from the DB, but I'm fairly certain all of it is qwritten with Response.Write.
These two sites are in identical environments, on the same server, using the same DB (well a copy of one anyway)
I use ASP, but i dont think it matters. I am parsing large text files. some of them have non standard characters. I just want to parse a file and replace anything that is not found on a keyboard in usa. I just want to keep:
A-Z, a-z, 0-9, .,?'"!@#$%^&*()-_=+";:<>/|}{[]`~
everything else i want to remove (asian letters, wacky characters, etc)
I know there is a way of stripping out special characters from a string however I need a way of stripping out "" marks from a string or what i really want is to replace all double ("") marks in a string with single ('') marks before inserting the string into a database. Is there a way of doing this in ASP?
I'm trying to strip out none alphanumeric characters (and a couple of punctuation marks) from a string before inserting into a database.
I've put in my code below, basically I thought I'd loop through each character in turn and pass it through a regular expression to check its validity. If it passes I'll add it to a global variable ('validString') if it fails I'll remove it.
But I can't get my Mid() function to accept 'i' as a value so it won't loop. Code:
I am trying to display records ( text and images) from a database. I get the text displayed but the image is displayed as a large series of Asscii text.
Connect.open "DSN=Rentals" 'declare sql statement that will query the database query = "Select * FROM RentalTable WHERE Location LIKE '%" query = query & Replace(request("varLocation"), "'", "''") & "%'" query = query & " AND PropertyType = '" & Replace(request("varPropertyType"), "'", "''") query = query & "' ORDER BY DateAvailable" RS.Open query, Connect
do until RS.EOF %> <table width="75%" border="1"> <tr> <td><%=RS("Address")%></td> <td><%=RS("Location")%></td> <td <% Response.ContentType = "image/gif" Response.BinaryWrite(rs("Image1")) %> </td> </tr> </table>........
Am trying to restrict user from entering non ASCII character in the text area. Say if the user entered non ASCII character then on the form post back it should show them the message like:
i have a record that is returned by the database as domain/username. i want to be able to strip off "domain/" and just display "username". is this possible? if so, how would i go about doing this?
My ASP page allows user to enter comments into a form. To avoid errors I'm having to strip out double quotes before saving to the database. Is there anyway to encode these so that I can store them instead, in the way was an URLEncode works?
in my front end uses will type in a date in a text box. in the code it want to call each individual i.e the month the day and the year i am not sure of how to do this.
i have a record that is returned by the database as domain/username. i want to be able to strip off "domain/" and just display "username". is this possible? if so, how would i go about doing this?
I want to strip email from the text. Some of my users may send me a string:
str = "This is email 1: Join Bytes! and here is email 2: <a href="mailto:me@me.com">me@me.com</a>"
How do I parse the string to get email address only? mI know I may use instr() to determine if email address exists, but please, give me a hint on how to handle it next.
I'm querying a text field with an 8000 character limit. The text also contains HTML tags like <p> <br> and more. Is there a way to strip all HTML tags in the resulting recordset, or do I have to replace each tag individually?
I have an asp page that reads the contents of a database and creates an xml news feed. I have code that strips out the <BR> and <P></P> tags, but it looks one of the databases I'm trying to read from uses only <P> without the closing tag.
So the make a long story short, I can't figure out what to add to my code to strip out these tags (or if that isn't the problem at all!) Code:
I need to make a function that takes Request.QueryString elements and strips all single quotes from the input.
function StripQuotes(array) dim StripQuotes for each old in array new = replace quotes (old) Add new to StripQuotes next return StripQuotes end function
i have a password reminder page that works, but i'm trying to strip down the username. it's in the database as domain/username, but i don't want the user to see the domain in the email they receive.
when i run the page i get a type mismatch error pointing to the line where i'm outputting the username in the email. i can get this to work when i'm outputting the data to a web page. is it because of cdonts? how would i strip off the data? Code:
I am using two fields on a form to capture time someboby is working. The fields are hours and minutes. How can I when submitting to the db take both fields and convert them to a single field in the db as minutes?
I'm looking for a control to us on our web site that will take our reports that are generated in PDF and convert them to DOC format all on the server. We are using win2k3 web servers if that helps.
I have developed an access database with VBA. Right now its on a network drive and is shared by 75 users. Works fine.
Now I would like to have this in the company intranet. Is it advisable to go with ASP? I recently installed IIS in my system. After that I have no idea how to convert my application to ? Is there a website or any walk through how to get my stuff's solved.
My application has 20 input screens, data add, save, update and also sends email based on certain rules. Is it possible to do all these stuffs?
I want to convert CSV file to XLS. Is there anyway this can be done in ASP without renaming the file to XLS.Also can there Macros to Sort data in it while generating XLS?
I have some PHP scripts that need to be converted to ASP3 so that they can run on a Micrsoft NT server using ADO. My knowledge of ASP is limitied so i was hoping you could answer a few questions..
1. Is ADO part of ASP.net or is this completely different? 2. Is ASP3 the same as ASP.net? 3. Is there any advice you can give me regarding converting from PHP to ASP3?
I've stored a set of months in an access database as numbers but when it display on the front end I need it to display as the name of the month.
How would you convert the numbers in the database to their word equivalent? Or is it possible to arrange the months in their correct order in the database?