FileHelpers - how to read character ®?

I am reading a CSV file and everything is working correctly. All fields go to the right places, but they convert ® to.

var engine = new FileHelperEngine(typeof(T)); return engine.ReadStream(new StreamReader(stream)) as T[]; 

Any ideas on how to prevent this?

EDIT:

Using spender, I got this to work:

 var engine = new FileHelperEngine(typeof(T), Encoding.UTF8); return engine.ReadStream(new StreamReader(stream, Encoding.UTF8)) as T[]; 

I needed to set the encoding in BOTH places for this. Otherwise, I saw strange results.

+7
c # filehelpers
source share
1 answer

Set the correct encoding in StreamReader.

http://msdn.microsoft.com/en-us/library/ms143456.aspx

+6
source share

All Articles