mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 20:13:06 +00:00
Make CSV files UTF-8 w/o BOM (#4196)
This commit is contained in:
parent
0f936f88f4
commit
4f26560233
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using PKHeX.Core;
|
||||
|
@ -116,7 +117,7 @@ public partial class ReportGrid : Form
|
|||
private async Task Export_CSV(string path)
|
||||
{
|
||||
await using var fs = new FileStream(path, FileMode.Create);
|
||||
await using var s = new StreamWriter(fs, System.Text.Encoding.Unicode);
|
||||
await using var s = new StreamWriter(fs, new UTF8Encoding(false));
|
||||
|
||||
var headers = dgData.Columns.Cast<DataGridViewColumn>();
|
||||
await s.WriteLineAsync(string.Join(",", headers.Skip(1).Select(column => $"\"{column.HeaderText}\""))).ConfigureAwait(false);
|
||||
|
|
Loading…
Reference in a new issue