Hey.
Question about fread() function in PHP . The second argument is the number of bytes that must be read in the file.
As an example, I wrote the text 1Hello in the data.txt file, 1Hello UCS-2 encoding. If I look at this file in the hex editor, I’ll see it 
I also wrote a script in the 1.php file with UTF-8 encoding, which reads from the file by ONE byte.
<?php $q=fopen("data.txt","r"); for($i=1;$i<=filesize("data.txt");$i=$i+1){ echo "$i: ".fread($q,1); echo "<br/>"; } ?> Brought this:
I deliberately set the two-byte encoding to see, and what will I get if I get to the "middle" of encoding the ordinal number of a character with the fopen function. I do not understand what I brought. What encoding is it derived from? What are these points between the letters inserted? They can be seen in the picture.
