-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Description
Symfony version(s) affected
7.3.2
Description
Output to the console has special characters transformed when explicitly using the OutputInterface::OUTPUT_RAW
.
The line-feeds are converted to control linefeeds, therefore corrupting the binary content.
How to reproduce
use Jasper4PHP\Builders\ReportBuilder;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
use Symfony\Component\Console\Formatter\OutputFormatterStyleInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
#[AsCommand(
name: 'export',
description: 'Export a photo',
)]
class ExportCommand extends Command
{
public function execute(InputInterface $input, OutputInterface $output): int
{
$output->write("HELLO\r\nWORLD", false, OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_NORMAL);
return Command::SUCCESS;
}
}
Possible Solution
No response
Additional Context
I'm running this on Windows 11.