When I set my PATH to point to my XAMPP PHP (5.6, or 7.1) and then run php test.php containing
<?php
echo 'ěščřžýáíé';
encoded in UTF-8, then I get the ěščřžýáíé output displayed correctly in my CLI (Git Bash).
However, when I change my PATH to point to any WAMP PHP (5.6.25, or 7.0.10), as I wanted to part with XAMPP, I get broken output: ─Ť┼í─Ź┼Ö┼ż├Ż├í├ş├ę.
- There is the
default_charset = "UTF-8"line in all three of WAMP'sphp.inifiles - I have added the line
AddDefaultCharset UTF-8to my WAMP'shttpd.conf, though that shouldn't matter at all in CLI mode - I have tried comparing contents of the PHP configuration files (XAMPP/WAMP) side by side but couldn't find any relevant differences