c# - Problem with Encoding in FileOpen and StringBuilder in i18n -


when @ file have saved i18n, ok example there "fïll Âll ülle~" in want..but way in code trying read contects of file , return string thing that:

        string sline = string.empty;         stringbuilder shtmltext = new stringbuilder();         int nfilehandle = filesystem.freefile();          shtmltext.append(string.empty);         filesystem.fileopen(nfilehandle, sfilename, openmode.input, openaccess.default, openshare.default, -1);          while (!filesystem.eof(nfilehandle))         {             sline = filesystem.lineinput(nfilehandle);             shtmltext.append(sline);         };         filesystem.fileclose(nfilehandle);         return shtmltext.tostring(); 

but when debugging it, corrupting correct translated stuff "fïll Âll ülle~" , manipulating them, think method not doing in way honors encoding have set computer regional/language settings french .... how can correct existing code or write similar cares encoding , lang set on computer?

thsanks

have @ http://msdn.microsoft.com/en-us/library/ms143456.aspx use streamreader correct encoding.

hth

mario


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -