Skip to content

Commit 1c7fb7b

Browse files
committed
Always ouput ASCII format in BAS files
1 parent c628f9b commit 1c7fb7b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

SharpPocketToolsGUI/frmMain.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Public Class frmMain
219219
End If
220220
End If
221221

222-
ret = ExecuteProcess("ptools\wav2bin.exe", "--pc=" & cmbPcModel.Text & " """ & wavFile & """ """ & basFile & """", out, True, False)
222+
ret = ExecuteProcess("ptools\wav2bin.exe", "--utf8=no --pc=" & cmbPcModel.Text & " """ & wavFile & """ """ & basFile & """", out, True, False)
223223
txtLog.Text &= out & vbCrLf
224224
If ret <> 0 Then
225225
txtLog.Text &= vbCrLf & "wav2bin returned error " & ret & "!" & vbCrLf
@@ -488,14 +488,14 @@ Public Class frmMain
488488

489489
'Replace the original file if the Overwrite option is checked.
490490
If optOverwrite.Checked Then
491-
My.Computer.FileSystem.WriteAllText(finalFile, changedLines, False)
491+
My.Computer.FileSystem.WriteAllText(finalFile, changedLines, False, System.Text.Encoding.ASCII)
492492
Else
493493
If My.Computer.FileSystem.FileExists(finalFile) Then
494494
Dim index As Integer = 1
495495
Do While My.Computer.FileSystem.FileExists(String.Concat(finalFile.AsSpan(0, finalFile.Length - 4), " (" & index & ").BAS"))
496496
index += 1
497497
Loop
498-
My.Computer.FileSystem.WriteAllText(String.Concat(finalFile.AsSpan(0, finalFile.Length - 4), " (" & index & ").BAS"), changedLines, False)
498+
My.Computer.FileSystem.WriteAllText(String.Concat(finalFile.AsSpan(0, finalFile.Length - 4), " (" & index & ").BAS"), changedLines, False, System.Text.Encoding.ASCII)
499499
End If
500500
End If
501501
End Sub

0 commit comments

Comments
 (0)