Remove strange/special characters from string

Hello,

I am getting a csv and then to datatable, so I can match data, but I am facing that some sentences contains � this character. Due to this, some data is not matched.

Do you know how can I remove it from string?

PD: these does not work:

  • myvar.tostring.replace(“�”,“”)
  • for each row in dt: row(0) =String.Concat(row(0).ToString.AsEnumerable().Where(Function(x) Char.IsLetterOrDigit(x)))

these dirty characters come in the majority when csv is read in within the wrong character encoding set

have a look here: