473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

encoding and saving of strange charaters

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
Feb 7 '06 #1
0 992

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Brahim Machkour | last post by:
Hello, I'm using JAXB to export/import data from/to a DB through XML files. Everything is working well. I would like also to be able to edit the file using an editor, typically XMLSpy....
1
by: The Eeediot | last post by:
If you use the command UPDATE <tablename> SET <fieldname> = ' ... ' to update a CHAR or TEXT field there are some characters that can cause problems such as a single quote. Are there any other type...
9
by: Joe Blow | last post by:
Strange problem, Web pages encoded in utf-8 are appearing on customers' browsers as iso-western european. This means that characters like the British Ł symbol get messed up. No amount of...
4
by: H Lee | last post by:
Hi, I'm an XML newbie, and not sure if this is the appropriate newsgroup to post my question, so feel free to suggest other newgroups where I should post this message if this is the case. I'm...
8
by: pabv | last post by:
Hello all, I am having a few issues with encoding to chinese characters and perhaps someone might be able to assist. At the moment I am only able to see chinese characters when displayed as...
5
by: Lee | last post by:
Hi, I have a rich text box that can have hyperlinks ect within the text! when I save this data to file how should I do it? that is can I just save it as text? or do I need to serialize it...
14
by: Zoro | last post by:
My task is to read html files from disk and save them onto SQL Server database field. I have created an nvarchar(max) field to hold them. The problem is that some characters, particularly html...
2
by: hdf | last post by:
hi could you hlp me with this each time i draw reports from my sql database it display the following charaters don’t insted of the don't and you hlpme with this. it hpens every time some one...
0
by: a | last post by:
hallo vs 2005 here on saving an htm file with a custom encoding (from the little arrow on the Save button in the file save dialog window) how to have the iso-8859-1 encoding ? I'm in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.