asp classic - ADODB.Stream ReadText error -
asp classic - ADODB.Stream ReadText error -
i using downloaded pure asp script upload files. form contains textarea , file upload component. works fine when come in regular text cannot handle when re-create , paste word having special characters. error getting is:
provider error '80070057'
the parameter incorrect.
/forum/freeaspupload.asp, line 309
the part of code throws error is:
private function convertutf8bytestostring(start, length) streamrequest.position = 0 dim objstream dim strtmp ' init stream set objstream = server.createobject("adodb.stream") objstream.charset = "utf-8" objstream.mode = admodereadwrite objstream.type = adtypebinary objstream.open ' write bytes stream streamrequest.position = start+1 streamrequest.copyto objstream, length objstream.flush ' rewind stream , read text objstream.position = 0 objstream.type = adtypetext strtmp = objstream.readtext ' close , homecoming objstream.close set objstream = nil convertutf8bytestostring = strtmp end function line 309 line:
strtmp = objstream.readtext any thought how prepare it?
asp-classic
Comments
Post a Comment