c# - Can't fully correct encoding issue from website -
this question has answer here:
- how can transform string utf-8 in c#? 7 answers
i'm developing web scraper soccer site. there issue when pulling in names various countries (which, obviously, have various characters). i've worked out method correct of it, it's not catching turkish or else. here have far:
private string formatme(string sf) { string mystring = encoding.utf8.getstring(encoding.utf8.getbytes(sf)) .replace("é", "é") .replace("á", "á") .replace("Ã", "í") .replace("ó", "ó"); return mystring; }//end format
here's an example of site pull from.
is there anyway can fix encoding site in 1 fell swoop?
i have found answer! assuming text coming in utf8. this question helped lot!