问题
I have a field in my csv file which contains the text: Frozen at 20°C
but when i import into my database it appears as: Frozen at 20�C
anyone know how i can keep the correct degree symbol?
my import code looks like this
string fieldValue = csv[i].Trim();
回答1:
I just needed to specify Encoding.Default when creating my stream reader
CsvReader csv = new CsvReader(new StreamReader(file.InputStream, Encoding.Default), true)
Thanks for all the help Stephane you got me there in the end.
来源:https://stackoverflow.com/questions/3830512/import-degree-symbol-from-excel-or-csv-file-to-mssql-database