오디오 디바이스 한글 깨짐 수정: PowerShell UTF-8 출력 강제
This commit is contained in:
parent
438aa1de6c
commit
1647321540
1 changed files with 2 additions and 1 deletions
|
|
@ -234,10 +234,11 @@ class AudioCaptureService extends EventEmitter {
|
||||||
try {
|
try {
|
||||||
// PowerShell로 Windows 오디오 입력 디바이스 열거
|
// PowerShell로 Windows 오디오 입력 디바이스 열거
|
||||||
const { execSync } = await import('child_process')
|
const { execSync } = await import('child_process')
|
||||||
const psCommand = `Get-CimInstance Win32_SoundDevice | Where-Object { $_.StatusInfo -eq 3 } | Select-Object -Property DeviceID, Name | ConvertTo-Json -Compress`
|
const psCommand = `[Console]::OutputEncoding = [Text.Encoding]::UTF8; Get-CimInstance Win32_SoundDevice | Where-Object { $_.StatusInfo -eq 3 } | Select-Object -Property DeviceID, Name | ConvertTo-Json -Compress`
|
||||||
const output = execSync(`powershell -NoProfile -Command "${psCommand}"`, {
|
const output = execSync(`powershell -NoProfile -Command "${psCommand}"`, {
|
||||||
encoding: 'utf8',
|
encoding: 'utf8',
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
env: { ...process.env, PYTHONIOENCODING: 'utf-8' },
|
||||||
}).trim()
|
}).trim()
|
||||||
|
|
||||||
if (output) {
|
if (output) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue