You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure to what degree this is os related, the commandline
aka console is using the standard US oem codepage with both
windows 7 and windows 10, however when using wstr to output
text in combination with ' | more' or ' > ' aka piping output
the output is mangled.
Tested on windows 7 and windows 10
fbc 1.09 and fbc 1.10.
Sample code to illustrate the issue:
dim help as string
help = "example: cmdsqlite.exe game.db select name from game where name like 'a%'"
select case command()
case "-h", "-help", "--help", "-man"
print wstr(help)
case "-nowstr"
print help
case else
print "invalid switch"
end
end select
Compile above code (by example as wstr_issue.exe) and run:
Normal output
wstr_issue.exe -h
Mangled output
wstr_issue.exe -h | more
or
wstr_issue.exe -h > test.txt
Normal output
wstr_issue.exe -nowstr | more
wstr_issue.exe -nowstr > test.txt
Not sure to what degree this is os related, the commandline
aka console is using the standard US oem codepage with both
windows 7 and windows 10, however when using wstr to output
text in combination with ' | more' or ' > ' aka piping output
the output is mangled.
Tested on windows 7 and windows 10
fbc 1.09 and fbc 1.10.
Sample code to illustrate the issue:
Compile above code (by example as wstr_issue.exe) and run:
Normal output
wstr_issue.exe -h
Mangled output
wstr_issue.exe -h | more
or
wstr_issue.exe -h > test.txt
Normal output
wstr_issue.exe -nowstr | more
wstr_issue.exe -nowstr > test.txt
In depth info commandline see:
https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/
https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
The text was updated successfully, but these errors were encountered: