fix: sqlpackage 管道输出 不使用 UTF-8编码特定,使用反而会乱码

This commit is contained in:
wjq 2024-12-13 08:09:50 +00:00
parent 280b3fc7d1
commit 04353f3fdf

View file

@ -346,7 +346,7 @@ public class DeployMSSqlHelper(LocalSyncServer context)
{
FileName = LocalSyncServer.SqlPackageAbPath, // The command to execute (can be any command line tool)
Arguments = arguments,
StandardOutputEncoding = System.Text.Encoding.UTF8,
// StandardOutputEncoding = System.Text.Encoding.UTF8,
// The arguments to pass to the command (e.g., list directory contents)
RedirectStandardOutput = true, // Redirect the standard output to a string
UseShellExecute = false, // Do not use the shell to execute the command