Can you help me?
I write command line script in php. I need to read char from file , which i open by fopen
. I use fgetc
, but letter like á, ž, é, ř
etc. are incorrect.
$this->inputFile=fopen(arguments::$input, "r");
$char=fgetc($this->inputFile);
echo "char: ".$char."\n";
output of á or ř
is �