Skip to content

Commit a9f6ae9

Browse files
authored
v6.4
switch to ansi codepage (850 Latin 1) to get truetype fonts in the console
1 parent 4f705d2 commit a9f6ae9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Compressed 2 TXT.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@(echo off% <#%) &color 07 &title Compressed2TXT v6.4 - Files/Folders SendTo menu ascii encoder and makecab by AveYo
2-
chcp 28591 >nul &set "0=%~f0" &set 1=%*& powershell -nop -c iex ([io.file]::ReadAllText($env:0)); &exit/b ||#>)[1]; $PS={
2+
chcp 850 >nul &set "0=%~f0" &set 1=%*& powershell -nop -c iex ([io.file]::ReadAllText($env:0)); &exit/b ||#>)[1]; $PS={
33

44
## Now defaults to BAT91 and short lines
55

@@ -9,7 +9,7 @@ $SendTo = [Environment]::GetFolderPath('ApplicationData') + '\Microsoft\Windows\
99
## Save to SendTo menu when run from another location as well as when copy-pasted directly into powershell console
1010
if (!$env:1 -and $env:0 -notlike '*\SendTo\Compressed 2 TXT*') {
1111
$BAT='@(echo off% <#%) &color 07 &title Compressed2TXT v6.4 - Files/Folders SendTo menu ascii encoder and makecab by AveYo'+"`n"
12-
$BAT+='chcp 28591 >nul &set "0=%~f0" &set 1=%*& powershell -nop -c iex ([io.file]::ReadAllText($env:0)); &exit/b ||#>)[1]'
12+
$BAT+='chcp 850 >nul &set "0=%~f0" &set 1=%*& powershell -nop -c iex ([io.file]::ReadAllText($env:0)); &exit/b ||#>)[1]'
1313
$BAT+='; $PS={' + $PS + '}; .$PS; .$Main' + "`n#-.-# hybrid script, can be pasted directly into powershell console"
1414
[IO.File]::WriteAllLines($SendTo + '\Compressed 2 TXT.bat', $BAT -split "`r`n" -split "`n", [Text.Encoding]::ASCII)
1515
}
@@ -104,7 +104,7 @@ if (!$env:1) { timeout -1; return }
104104
return
105105
}
106106
## Generate text decoding header - compact self-expanding batch file for bundled ascii encoded cab archive of target files
107-
$HEADER = "@echo off &chcp 65001 >nul &pushd `"%~dp0`"`r`n"
107+
$HEADER = "@echo off &chcp 850 >nul &pushd `"%~dp0`"`r`n"
108108
$HEADER += '@set "0=%~f0" &powershell -nop -c $f=[IO.File]::ReadAllText($env:0)-split'':bat2file\:.*'';iex($f[1]); X(1) '
109109
$HEADER += "&timeout /t 6 &exit/b`r`n`r`n:bat2file: Compressed2TXT v6.4`r`n"
110110
## Choice 4: Long lines (less overhead) - each line has 4 extra chars (cr lf ::) and short lines are ~8 times as many

0 commit comments

Comments
 (0)