Some special characters are not shown

时间:2018-09-18 19:42:52

标签: c# encoding

I'm working with a csv that contains some accented words, it's already coming in symbol form ... how can I fix this problem

input:
BRAND�O

expected:
BRANDÃO

I am using this code:

Encoding encoding = Encoding.GetEncoding("ISO-8859-1");
var bytes = encoding.GetBytes("BRAND�O");
string out = encoding.GetString(bytes);

the out is:

BRAND?O

0 个答案:

没有答案