Solved

Classic ASP submit form to csv

Posted on 2011-03-18
2
599 Views
Last Modified: 2012-05-11
I have this script that writes a form submission to a csv.  The problem is that it does not render apostrophes or quotation marks properly.  it produces • and â— along with a box with a question mark in it.


whichFN=server.mappath("/survey/results/" & FILENAME & ".csv")

	Set fstemp = server.CreateObject("Scripting.FileSystemObject")
	if (fstemp.FileExists(whichFN)) = true then
		Set filetemp = fstemp.OpenTextFile(whichFN, 8, true, 0)
	else
		Set filetemp = fstemp.CreateTextFile(whichFN, true, false)
		filetemp.writeline SORT
	end if
	filetemp.writeline message2
	filetemp.close

Open in new window

0
Comment
Question by:rswanigan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
tobzzz earned 500 total points
ID: 35171541
Hi rswanigan,

Is the actual page saved as UTF-8? You can open a page in Windows Notepad and save it as UTF-8 to be sure. You should have these tags in your page
(1) at the top of any ASP page:
<%@ Language=VBscript Codepage="65001" %>
and
(2) in between <head> tags
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
then
(3) save as U8-DOS/UTF-8

Good Luck!

/ Tobzzz
0
 

Author Comment

by:rswanigan
ID: 35173721
Tobzzz,

That looks like it may have worked.   I am going to do some more testing.  Also I check the old csv that was presenting problems and noticed it was encoded UTF-8.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question