1
Vote

Converting string ISO-8859-1 to utf-8 charset

description

At the checkout of a file with the accentuation ISO-8859-1, the system does not find the file generating an HTTP 404 error.

Problem:
Repository url: http://damases2.googlecode.com/svn/trunk/
File problem: http://damases2.googlecode.com/svn/trunk/Damas2/build/classes/damas2/resources/peçaazulrealce.PNG

Solution:
in the method: DownloadFile, add the lines at the beginning:
var fileName_inBytes = Encoding.Default.GetBytes(fileName);
fileName = Encoding.UTF8.GetString(fileName_inBytes);

var url_inBytes = Encoding.Default.GetBytes(url);
url = Encoding.UTF8.GetString(url_inBytes);

comments