TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Torbjorn Svae
NA
35
0
Problems with special letters like ÆØÅ from html code to listbox
Aug 8 2010 12:24 PM
Hi
I'm trying to parse a HTML page where I ran into a small problem(well sort off big to me). F.eks lets take the letter Ø. In the HTML code the Ø = "Ø".
I thought I could replace the string like this:
line = line.Replace("Ø", "Ø").Replace("Ø", "Ø").Replace("Ø", "Ø");
But when I add the string to the listbox, it comes out like f.eks: "DD8;ivind".
How can I print out special characters like this in a correct way?
Also, I'm going to insert this data into a mysql database, how will this look like? When the Ø is "Ø", it becomes the same in the database as well.
If it is to any relevanse, I read the page like this:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.AllowAutoRedirect = true;
req.Method = "GET";
req.Timeout = 6000;
WebResponse res = req.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream());
page = sr.ReadToEnd();
sr.Close();
res.Close();
parsePage();
and the web page content-type is:
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
I hope there is an easy way to my problem.
Regards,
LordSvae
Reply
Answers (
4
)
Problem with overloading operator+
locked textbox