string convertion

bhavin12300

Active member
Joined
Sep 18, 2007
Messages
44
Programming Experience
Beginner
hi , i am scraping title of webpage. i am using webclient class to get its html source.
the true title of webpage is this which apprear on browser
"La révolution"
but when i extract it from html source using webclient class i get following string.
"La révolution du sourire juste"

i think its something related to string conversion. so any one help me how to convert this "La révolution du sourire juste" to "La révolution"???
following info on webpage might give you some clue which is content type.
" <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
"

help me.
 
The WebClient socket class will attempt to read the string with correct encoding when using its DownloadString method, if it doesn't use correct encoding you can use the DownloadData method instead and decode with the System.Text.Encoding you think is correct.
 
Back
Top