Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange characters in php cli output

Some strange character are outputted at the beginning of some php console commands.

Running composer the output is ok, but laravel artisan or phpunit outputs ´╗┐.

Example

I've tried to encode artisan and phpunit files to UTF-8 without BOM like suggested in php 5.3 CLI junk characters, but that was not the problem.

I'm using ConEmu v131215 on Windows XP x64 and PHP 5.4.24

Question: Where can I possibly find the file that outputs the strange characters that show up at the start of every PHP command line program?

Even in windows console this problem happen, not only in ConEmu.

Installing a fresh php 5.3 with default php.ini produces the same result

PHP 5.3 output

like image 677
gmsantos Avatar asked Feb 20 '14 17:02

gmsantos


1 Answers

An old vendor lib from FusionCharts encoded as UTF-8 with BOM was the problem.

This file was loaded in my composer.json using autoload files from composer, so every time I used vendor\autoload.php this file with BOM produced that weird char.

like image 173
gmsantos Avatar answered Sep 30 '22 15:09

gmsantos