[英]import degree symbol (°) from excel or csv file to mssql database
I have a field in my csv file which contains the text: Frozen at 20°C 我的csv文件中有一个字段,其中包含文本:在20°C下冻结
but when i import into my database it appears as: Frozen at 20 C 但是当我导入数据库时,它显示为:冻结在20°C
anyone know how i can keep the correct degree symbol? 有人知道我如何保持正确的学位符号吗?
my import code looks like this 我的导入代码如下所示
string fieldValue = csv[i].Trim();
I just needed to specify Encoding.Default when creating my stream reader 我只需要在创建流阅读器时指定Encoding.Default
CsvReader csv = new CsvReader(new StreamReader(file.InputStream, Encoding.Default), true)
Thanks for all the help Stephane you got me there in the end. 感谢Stephane的所有帮助,您最终使我到了那里。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.