C#:Excel 缅甸字体数据的导出不正确

C#: Excel export doesn't show correctly for Myanmar Font data

我正在尝试将数据表数据作为 CSV 文件获取。但是缅甸字体的数据在excel中显示不正确。显示为如下字符。

"လá'်း áႠလေးပုံá€á€•ုံ á'á €¼á€á€¯á€·” 我附上了我的代码。

DataTable dt = ToDataTable(objList);
        StringBuilder sb = new StringBuilder();

        IEnumerable<string> columnNames = dt.Columns.Cast<DataColumn>().
                                          Select(column => column.ColumnName);

        sb.AppendLine(string.Join(",", columnNames));

        foreach (DataRow row in dt.Rows)
        {
            IEnumerable<string> fields = row.ItemArray.Select(field => field.ToString());
           
            sb.AppendLine(string.Join(",", fields));
        }
        string folderPath = HttpContext.Current.Server.MapPath("/Files") + "/Files/Export/";
        File.WriteAllText(folderPath + "Export.csv", sb.ToString());

替换

File.WriteAllText(folderPath + "Export.csv", sb.ToString());

File.WriteAllText(folderPath + "Export.csv", sb.ToString(), Encoding.Unicode);

根据 https://www.unicode.org/faq/myanmar.html#:~:text=A%3A%20The%20Myanmar%20script%20was,extended%20the%20script%20in%202009.

The Myanmar script was added to the Unicode Standard in Version 3.0 (September, 1999). Version 5.2 significantly extended the script in 2009