vbscript - HTML VBS Special Character handling -
i have file uses website specific query , returns data needed via html headers. when writing returned data file sql query supplied works fine. if query has special characters in it, stops @ point.
examples of characters cause problem "?", "~", "_". have tried find several work arounds data coming have yet determine new means functions.
this how exporting data when comes back:
set objexportfile = objfso.opentextfile(exportfilelocation, 8, true, -1) objexportfile.writeline(objhead.responsetext) objexportfile.close
thanks,
you this
dim badchar(2) dim char dim header badchar(0) = "?" badchar(1) = "~" badchar(2) = "_" header = objhead.responsetext each char in badchar if instr(header, char) header = replace(header, char, "") end if next set objexportfile = objfso.opentextfile(exportfilelocation, 8, true, -1) objexportfile.writeline(header) objexportfile.close
Comments
Post a Comment