maker-bundle icon indicating copy to clipboard operation
maker-bundle copied to clipboard

Ansi Color and strange characters

Open WhiteRoseLK opened this issue 4 years ago • 10 comments
trafficstars

Hi, I have the following issue on Windows with cmd and phpStorm terminal. I try to reinstall wamp and composer but nothing work. On my second computer php cli work perfectly so I think I miss something.

Description When you wrote make:entity or make:form (maybe more command do the same issue) I got strange character like this : image

--no-ansi remove a part of strange character but not all :

Examples With make:entity : image You can see colors work with the first sentence but not works after the input With make:entity and --no-ansi : image

WhiteRoseLK avatar Nov 30 '20 12:11 WhiteRoseLK

@Rankangi your issue looks related to symfony/maker-bundle. I'm transferring your issue there.

tucksaun avatar Nov 30 '20 13:11 tucksaun

Howdy @Rankangi! Does this happen when you run make:entity or make:form in a native windows terminal? (not in the PHP Storm Terminal)

What version of Windows are you using? What version of PHP Storm are you using? Have you experienced similar problems in other programs (on the CLI or regular apps) on your operating system?

jrushlow avatar Dec 01 '20 18:12 jrushlow

Hi @jrushlow! Yes it does ! image

I'm using windows 10 version 10.0.19041 And my phpStorm version is 2020.2.2

No, this is the only one in my computer. But on my laptop I have the same version of Windows and PhpStorm but make:entity and make:form works perfectly... I have try to uninstall - reboot - install composer/phpstorm and wampServer but the problem still exist

WhiteRoseLK avatar Dec 01 '20 20:12 WhiteRoseLK

Has anyone solved this problem? In my case the same thing appears image

Kris2x avatar Feb 03 '21 20:02 Kris2x

Having the same issue even using another shell (tried with git bash)

usersina avatar Mar 22 '21 13:03 usersina

This happens to me too! Using maker bundle 1.28.0 on windows inside terminal in PHPStorm. any ideas what would cause this?

siguycmo avatar May 17 '21 19:05 siguycmo

Happens to me as well. Any solutions yet?

jonastandinco avatar Aug 05 '21 02:08 jonastandinco

Same problem here. Fresh intall of symfony 5.4

Basch avatar May 14 '22 22:05 Basch

Long shot but just out or curiosity - what is the value of core.autocrlf when you run git config --global --list in windows? I just ran into a strange problem where core.autocrlf was set to true and it screwed up a bunch of tests.

Ultimately what was happening - when the code was being checked out, git could convert \n to windows \r\n and tests against fixtures would blow up. I don't think this is the problem here, but it may be worth attempting to set core.autocrlf to input rather than true -> create a new symfony project (e.g. symfony new --webpapp) -> use a couple maker commands that were known to cause the weird CLI output.

Aside from that, I haven't made any progress on trying to hunt down the cause of this issue mainly because I don't have a windows box to debug on locally.

jrushlow avatar Jul 27 '22 20:07 jrushlow

HA! this problem is because of how escape chars are handled in windows (bash). \e[33m is the same as \033[33m

The 27th (decimal) or \033 octal sequence, or 0x1b hex sequence is the Escape sequence.

jrushlow avatar Apr 15 '24 22:04 jrushlow