Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > encoding and saving of strange charaters

Reply
Thread Tools

encoding and saving of strange charaters

 
 
Amil
Guest
Posts: n/a
 
      02-07-2006
I am screen scraping a web page via GetResponseStream and can't resave a
certain character in the stream:

Stream respStream = wResp.GetResponseStream();
StreamReader reader = new StreamReader(respStream, Encoding.ASCII); // have
also used other UTFx modes
String respHTML = reader.ReadToEnd();

There is a strange character on the web page; it is a extra long
hypen...like the one in MS Word that is used if you type in two normal
hypens. I read the character in and try to resave it to another HTML
file...but when I view the HTML file now, it just contains several non-ascii
characters.

Any idea how to preserse the strange characters? I don't know if things are
going amiss during the read or during the write of the new file (maybe the
new file and it only supports asii).

Any ideas?

Amil


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Need to know if a file as only ASCII charaters Dave Angel Python 9 06-17-2009 09:40 AM
gsub question on special charaters Robert Keller Ruby 3 11-20-2007 08:29 PM
Converting numbers to unicode charaters byte8bits@gmail.com Python 5 09-24-2007 04:31 PM
sending <STX><ETX > charaters to RS232 port jyotish.bora@gmail.com C++ 2 01-19-2006 10:06 PM
Wanted sending HTML email example with UTF-8 charaters! Zsolt Koppany Java 0 11-27-2003 12:24 PM



Advertisments